-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontroller.js
More file actions
24 lines (21 loc) · 760 Bytes
/
Copy pathcontroller.js
File metadata and controls
24 lines (21 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
export const externalAPI = {
EVENT_ADVERT: "advert", // not available
EVENT_CONTROLS: "controls", // half custom implementation
EVENT_READY: "init", // custom implementation
EVENT_SOURCE_INFO: "info", // custom implementation
EVENT_STATE: "state",
EVENT_TRACK: "track",
EVENT_TRACKS_LIST: "tracks",
EVENT_PROGRESS: "progress",
EVENT_SPEED: "ratechange",
EVENT_VOLUME: "volumechange",
events: new Map(),
on(type, listener) {
if (this.events.get(type) === undefined) this.events.set(type, new Set());
this.events.get(type).add(listener);
}
}
export const EXPECTED_DATA = window.EXPECTED_DATA;
export const DataReady = window.DataReady;
delete window.EXPECTED_DATA;
delete window.DataReady;