2014-06-06 20:52:15 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* The origin of this IDL file is
|
|
|
|
* https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
|
|
|
|
*
|
|
|
|
* Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
|
|
|
|
* W3C liability, trademark and document use rules apply.
|
|
|
|
*/
|
|
|
|
|
|
|
|
interface MediaKeySession : EventTarget {
|
|
|
|
// error state
|
|
|
|
readonly attribute MediaKeyError? error;
|
|
|
|
|
|
|
|
// session properties
|
|
|
|
readonly attribute DOMString sessionId;
|
|
|
|
|
|
|
|
readonly attribute unrestricted double expiration;
|
|
|
|
|
2014-08-01 03:50:30 +00:00
|
|
|
readonly attribute Promise<void> closed;
|
2014-06-06 20:52:15 +00:00
|
|
|
|
2015-01-31 00:23:07 +00:00
|
|
|
readonly attribute MediaKeyStatusMap keyStatuses;
|
|
|
|
|
2016-09-21 02:31:15 +00:00
|
|
|
attribute EventHandler onkeystatuseschange;
|
|
|
|
|
2016-09-21 02:56:20 +00:00
|
|
|
attribute EventHandler onmessage;
|
|
|
|
|
2015-01-12 16:52:25 +00:00
|
|
|
[NewObject]
|
2015-01-31 00:23:07 +00:00
|
|
|
Promise<void> generateRequest(DOMString initDataType, BufferSource initData);
|
2014-09-23 22:04:49 +00:00
|
|
|
|
2015-01-12 16:52:25 +00:00
|
|
|
[NewObject]
|
2014-09-23 22:04:49 +00:00
|
|
|
Promise<boolean> load(DOMString sessionId);
|
|
|
|
|
2014-06-06 20:52:15 +00:00
|
|
|
// session operations
|
2015-01-12 16:52:25 +00:00
|
|
|
[NewObject]
|
2015-01-31 00:23:07 +00:00
|
|
|
Promise<void> update(BufferSource response);
|
2014-06-06 20:52:15 +00:00
|
|
|
|
2015-01-12 16:52:25 +00:00
|
|
|
[NewObject]
|
2014-08-01 03:50:30 +00:00
|
|
|
Promise<void> close();
|
2014-06-06 20:52:15 +00:00
|
|
|
|
2015-01-12 16:52:25 +00:00
|
|
|
[NewObject]
|
2014-08-01 03:50:30 +00:00
|
|
|
Promise<void> remove();
|
2014-06-06 20:52:15 +00:00
|
|
|
};
|