tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

MediaKeySession.webidl (1504B)


      1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      4 * You can obtain one at http://mozilla.org/MPL/2.0/.
      5 *
      6 * The origin of this IDL file is
      7 * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
      8 *
      9 * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
     10 * W3C liability, trademark and document use rules apply.
     11 */
     12 
     13 enum MediaKeySessionClosedReason {
     14  "internal-error",
     15  "closed-by-application",
     16  "release-acknowledged",
     17  "hardware-context-reset",
     18  "resource-evicted"
     19 };
     20 
     21 [Exposed=Window]
     22 interface MediaKeySession : EventTarget {
     23  // error state
     24  readonly attribute MediaKeyError? error;
     25 
     26  // session properties
     27  readonly attribute DOMString sessionId;
     28 
     29  readonly attribute unrestricted double expiration;
     30 
     31  readonly attribute Promise<MediaKeySessionClosedReason> closed;
     32 
     33  readonly attribute MediaKeyStatusMap keyStatuses;
     34 
     35  attribute EventHandler onkeystatuseschange;
     36 
     37  attribute EventHandler onmessage;
     38 
     39  [NewObject]
     40  Promise<undefined> generateRequest(DOMString initDataType, BufferSource initData);
     41 
     42  [NewObject]
     43  Promise<boolean> load(DOMString sessionId);
     44 
     45  // session operations
     46  [NewObject]
     47  Promise<undefined> update(BufferSource response);
     48 
     49  [NewObject]
     50  Promise<undefined> close();
     51 
     52  [NewObject]
     53  Promise<undefined> remove();
     54 };