aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webidls/MediaMetadata.webidl
blob: 495aeef8e3534b90d020d8504512f35a1ac9028d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* 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 https://mozilla.org/MPL/2.0/. */
/*
 * The origin of this IDL file is
 * https://w3c.github.io/mediasession/#mediametadata
 */

dictionary MediaImage {
  required USVString src;
  DOMString sizes = "";
  DOMString type = "";
};

[Exposed=Window]
interface MediaMetadata {
  [Throws] constructor(optional MediaMetadataInit init = {});
  attribute DOMString title;
  attribute DOMString artist;
  attribute DOMString album;
  // TODO: https://github.com/servo/servo/issues/10072
  // attribute FrozenArray<MediaImage> artwork;
};

dictionary MediaMetadataInit {
  DOMString title = "";
  DOMString artist = "";
  DOMString album = "";
  sequence<MediaImage> artwork = [];
};