Partager via


Encrypted Media Extensions updates

Encrypted Media Extensions extends the audio and video elements to enable Digital Rights Management (DRM) protected content without using plug-ins. Since its initial implementation in Internet Explorer 11, the World Wide Web Consortium (W3C) specification has changed significantly. The Microsoft Edge implementation has been updated to reflect these changes.

Removing the -ms- prefix

Microsoft Edge introduces support for non-prefixed Encrypted Media Extensions APIs. The legacy -ms- prefixed APIs are still supported in IE11.

The following table shows the -ms- prefixed and non-prefixed API changes across versions.

IE11 Microsoft Edge
msMediaKeyMessageEvent MediaKeyMessageEvent
msMediaKeys MediaKeys
msMediaKeySession MediaKeySession
msSetMediaKeys setMediaKeys
msKeySystem keySystem

 

Other -ms- prefixed APIs supported in IE11 have been deprecated in Microsoft Edge. See the Other EME updates table below for a list of -ms- prefixed APIs not supported in Microsoft Edge.

Promise-based model

The W3C Encrypted Media Extensions specification has changed from an event-driven model to a new model based on JavaScript Promises. Microsoft Edge introduces support for this new model. The legacy model will still be supported in IE11.

The following table summarizes the Promise-based API changes across versions.

EME API area IE11 Microsoft Edge
close method (MediaKeySession) No return type Return type: Promise<void>
update method (MediaKeySession) void update(Uint8Array key); Promise<void> update(BufferSource response)
setMediaKeys method (HTMLMediaElement) No return type Return type: Promise<void>

 

Microsoft Edge also introduces support for new APIs using the promised-based model. See the Other EME updates table below for a list of new APIs in Microsoft Edge.

Other EME updates

The W3C Encrypted Media Extensions specification has changed significantly. Microsoft Edge now supports these new and updated APIs.

The following table summarizes the API changes across versions.

EME API area IE11 Microsoft Edge
MSMediaKeyError object Supported Not supported. Replaced with DOMExceptions
code property Supported Not supported
systemCode property Supported Not supported
MSMediaKeyNeededEvent object Supported Not supported
mskeyadded event Supported Not supported
mskeyerror event Supported Not supported
mskeymessage event Supported Not supported
onmsneedkey event Supported Not supported
isTypeSupported method Supported Not supported
msKeys property Supported Not supported
destinationURL property Supported Not supported
createSession method Parameters: type, initData Parameter: sessionType
message property Type: Uint8Array Type: ArrayBuffer
MediaKeySystemAccess object Not supported Supported
setServerCertificate method Not supported Supported
requestMediaKeySystemAccess method Not supported Supported
getConfiguration method Not supported Supported
createMediaKeys method Not supported Supported
closed property Not supported Supported
generateRequest method Not supported Supported
load method Not supported Supported
remove Not supported Supported
messageType property Not supported Supported
keystatuseschange event Not supported Supported
message event Not supported Supported
mediaKeys property Not supported Supported
onencrypted event handler Not supported Supported
MediaEncryptedEvent object Not supported Supported
initDataType property Not supported Supported
encrypted event Not supported Supported
waitingforkey event Not supported Supported
expiration property Not supported Supported
MediaKeyStatusMap object Not supported Supported
forEach method Not supported Supported
get method Not supported Supported
has method Not supported Supported