- From: <bugzilla@jessica.w3.org>
- Date: Tue, 03 Apr 2012 16:16:20 +0000
- To: public-html-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16613 Summary: Consider a more object-oriented design in which sessions are represented as objects Product: HTML WG Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P3 Component: Encrypted Media Extensions AssignedTo: adrianba@microsoft.com ReportedBy: watsonm@netflix.com QAContact: public-html-bugzilla@w3.org CC: mike@w3.org, public-html-wg-issue-tracking@w3.org, public-html@w3.org A variant of the API with the same functionality has been suggested in which key exchange 'sessions' are explicitly represented as objects. The methods used to supply a key/license or cancel the session become methods on this object, not the HTMLMediaElement itself. partial interface HTMLMediaElement { MediaKeySession generateKeyRequest(in DOMString keySystem, in Uint8Array? initData); }; interface MediaKeySession : EventTarget { readonly attribute DOMString keySystem; readonly attribute DOMString? sessionId; void addKey(in Uint8Array key); void cancel(); }; The following event would be fired at the MediaKeySession when a message is ready to be sent. [Constructor(DOMString type, optional MediaKeyMessageEventInit eventInitDict)] interface MediaKeyMessageEvent : Event { readonly attribute Uint8Array message; readonly attribute DOMString? defaultUrl; }; dictionary MediaKeyMessageEventInit : EventInit { Uint8Array message; DOMString? defaultUrl; }; Note that in the MediaKeySession interface, sessionId is guaranteed to be initialized only after the first MediaKeyMessageEvent. The following event would be fired at the MediaKeySession when the transaction is complete. (It could be replaced by a simple event.) [Constructor(DOMString type)] interface MediaKeyCompleteEvent : Event { }; Finally, the following event would be fired at MediaKeySession if getKeyRequest() or addKey() results in an error. [Constructor(DOMString type, optional MediaKeyErrorEventInit eventInitDict)] interface MediaKeyErrorEvent : Event { readonly attribute MediaKeyError errorCode; readonly attribute unsigned short systemCode; }; dictionary MediaKeyErrorEventInit : EventInit { MediaKeyError errorCode; unsigned short systemCode; }; -- Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Tuesday, 3 April 2012 16:16:29 UTC