* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+enum SessionType {
+ "temporary",
+ "persistent"
+};
+
[
RuntimeEnabled=EncryptedMedia,
- Constructor(DOMString keySystem),
- ConstructorCallWith=ExecutionContext,
- RaisesException=Constructor,
- WillBeGarbageCollected,
- TypeChecking=Interface|Nullable
+ GarbageCollected,
+ TypeChecking=Interface
] interface MediaKeys {
readonly attribute DOMString keySystem;
- [CallWith=ExecutionContext, RaisesException] MediaKeySession createSession(DOMString type, Uint8Array initData);
+ [CallWith=ScriptState] MediaKeySession createSession(optional SessionType sessionType = "temporary");
+
+ [CallWith=ScriptState] static Promise create(DOMString keySystem);
- static boolean isTypeSupported(DOMString keySystem, [Default=NullString] optional DOMString contentType);
+ static boolean isTypeSupported(DOMString keySystem, optional DOMString contentType = null);
};