Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional support of encryption mode #100

Closed
johnsim opened this issue Sep 11, 2018 · 11 comments · Fixed by #144
Closed

Conditional support of encryption mode #100

johnsim opened this issue Sep 11, 2018 · 11 comments · Fixed by #144

Comments

@johnsim
Copy link

johnsim commented Sep 11, 2018

@joeyparrish has begun to address this issue here: https://github.com/WICG/encrypted-media-encryption-scheme/blob/master/explainer.md. There are four modes of common encryption, ‘cbcs’, ‘cbc1’, ‘cenc’ and ‘cens’. A UA may support ‘cbcs’ but not ‘cenc’ – but it is also true it might only support ‘cbcs’ applied to a particular media profile/codec – so it is the combination of encryption mode and media type that needs to be asked about – the same problem as with Supplemental Data.

@chcunningham
Copy link
Contributor

Sounds good to me. I'm adding a "keySystemConfiguration" to MediaCapabilities in PR #101. Will do similar for encryption mode. @joeyparrish is this something your implementing in rMKSA for Chrome?

@scottlow
Copy link

@chcunningham It doesn't appear that this ever landed. Is this still on your todo list? Happy to help here if needed!

@chcunningham
Copy link
Contributor

chcunningham commented Apr 17, 2019

@scottlow, this is still on my list. Its easy to implement, but I recently realized the dictionary current shape doesn't support it well (cc: @mounirlamouri).

In EME, MediaKeySystemEncryptionScheme is added to the MediaKeySystemMediaCapabilitiy alongside robustness and contentType.

dictionary MediaKeySystemMediaCapability {
DOMString contentType = "";
DOMString robustness = "";
MediaKeyEncryptionScheme? encryptionScheme = null;
};

In MC, we already had audio and video contentType described in the Audio|VideoDecodingConfiguration dictionary, so we opted to just add the robustness string from the EME dict to our MediaCapabilitiesKeySystemConfiguration as audio|videoRobustness. Now that the EME dict also includes encryptionScheme I want to reconsider the pattern of audio|video* prefixed attributes ... its ugly.

Here's a strawman that moves in the direction of bucketing audio and video things more logically. Thoughts?

dictionary MediaCapabilitiesKeySystemConfiguration {
required DOMString keySystem;
DOMString initDataType = "";
TrackKeySystemConfiguration audioKeySystemConfig;
TrackKeySystemConfiguration videoKeySystemConfig;
MediaKeysRequirement distinctiveIdentifier = "optional";
MediaKeysRequirement persistentState = "optional";
sequence sessionTypes;
};

dictionary TrackKeySystemConfiguration {
// Open to making this default to something else if empty is really troublesome.
DOMString robustness = "";
EncryptionScheme? encryptionScheme = null;
};

@scottlow
Copy link

Agreed with wanting to move away from audio/video prefixes as the EME dict grows. This seems like a sound change to me! @mounirlamouri, do you have any other thoughts here?

@mounirlamouri
Copy link
Member

I don't have a strong opinion between prefixing and creating a new dictionary but maybe if we create a dictionary, it could be audio and video. No need to add KeySystemConfig prefix.

It would look like:

{
  type: 'media-source',
  audio: {
    [...]
  },
  video: {
    [...]
  },
  keySystemConfiguration: {
    audio: {
      robustness: ...,
      encryptionScheme: ...,
    },
    video: {
      robustness: ...,
      encryptionScheme: ...,
    }
  }
}

@chcunningham
Copy link
Contributor

Thats fine with me. I'll send a PR shortly.

@chcunningham
Copy link
Contributor

"Shortly"... sorry about the wait. I started coding this up and discovered the reason Chrome hasn't shipped the current proposal (from the explainer) is due to some ergonomics concerns. I'm working to get those published and sorted out. Expect another update by EOW.

@chcunningham
Copy link
Contributor

Ok, so the issues are published (were already actually) here https://github.com/WICG/encrypted-media-encryption-scheme/issues (those filed by David are what we're spinning on internally).

One of those has a PR already
WICG/encrypted-media-encryption-scheme#12

Some of the others have a harder path forward. I'm told Joey will try to squeeze some time in for this next week.

chcunningham added a commit that referenced this issue Oct 24, 2019
We previously prefixed robustness dict-members with 'audio' and
'video'. We now nest them under audio/video dicts to allow for
more elegant expansion of audio/video-specific fields alongside
robustness. Ex: encryptionScheme. See #100.
mounirlamouri pushed a commit that referenced this issue Oct 31, 2019
We previously prefixed robustness dict-members with 'audio' and
'video'. We now nest them under audio/video dicts to allow for
more elegant expansion of audio/video-specific fields alongside
robustness. Ex: encryptionScheme. See #100.
@joeyparrish
Copy link
Member

It looks like encryptionScheme would be added to KeySystemTrackConfiguration. Is that accurate?

@mounirlamouri
Copy link
Member

That's correct :)

@joeyparrish
Copy link
Member

The PR for EME encryptionScheme just landed today:

w3c/encrypted-media#457
https://w3c.github.io/encrypted-media/

joeyparrish added a commit to joeyparrish/eme-encryption-scheme-polyfill that referenced this issue Dec 11, 2019
joeyparrish added a commit to joeyparrish/eme-encryption-scheme-polyfill that referenced this issue Dec 18, 2019
joeyparrish added a commit to shaka-project/eme-encryption-scheme-polyfill that referenced this issue Dec 19, 2019
See w3c/media-capabilities#100

The top-level export name now reflects the fact that there are two
polyfills being installed.  This is a breaking change, so we bump the
version number to 2.0.0.

Closes #1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants