-
Notifications
You must be signed in to change notification settings - Fork 0
/
AudioTrackList.cljs
116 lines (83 loc) · 3.54 KB
/
AudioTrackList.cljs
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
(ns web.audio.AudioTrackList
"The AudioTrackList interface is used to represent a list of the
tracks contained within a given HTML media element, with each
represented by a separate `web.audio.AudioTrack` object in the"
(:refer-clojure :exclude []))
(defn get-track-by-id
"Method.
The `web.audio.AudioTrackList` method getTrackById() returns
first `web.audio.AudioTrack` object from the track list whose
matches the specified string.
`var theTrack = AudioTrackList.getTrackById(id);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/getTrackById`"
[this id]
(-> this (.getTrackById id)))
(defn length
"Property.
The read-only `web.audio.AudioTrackList` property length returns
number of entries in the AudioTrackList, each of which is an
representing one audio track in the media element.
`var trackCount = AudioTrackList.length;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/length`"
[this]
(-> this (.-length)))
(defn onaddtrack
"Property.
The `web.audio.AudioTrackList` property onaddtrack is an event
which is called when the addtrack event occurs, indicating that
new audio track has been added to the media element whose audio
the AudioTrackList represents.
`AudioTrackList.onaddtrack = eventHandler;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/onaddtrack`"
[this]
(-> this (.-onaddtrack)))
(defn set-onaddtrack!
"Property.
The `web.audio.AudioTrackList` property onaddtrack is an event
which is called when the addtrack event occurs, indicating that
new audio track has been added to the media element whose audio
the AudioTrackList represents.
`AudioTrackList.onaddtrack = eventHandler;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/onaddtrack`"
[this val]
(aset this "onaddtrack" val))
(defn onchange
"Property.
The `web.audio.AudioTrackList` property onchange is an event
which is called when the change event occurs, indicating that
or more of the `web.audio.AudioTrack`s in the AudioTrackList
been enabled or disabled.
`AudioTrackList.onchange = eventHandler;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/onchange`"
[this]
(-> this (.-onchange)))
(defn set-onchange!
"Property.
The `web.audio.AudioTrackList` property onchange is an event
which is called when the change event occurs, indicating that
or more of the `web.audio.AudioTrack`s in the AudioTrackList
been enabled or disabled.
`AudioTrackList.onchange = eventHandler;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/onchange`"
[this val]
(aset this "onchange" val))
(defn onremovetrack
"Property.
The `web.audio.AudioTrackList` onremovetrack event handler is
when the removetrack event occurs, indicating that an audio track
been removed from the media element, and therefore also from
AudioTrackList.
`AudioTrackList.onremovetrack = eventHandler;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/onremovetrack`"
[this]
(-> this (.-onremovetrack)))
(defn set-onremovetrack!
"Property.
The `web.audio.AudioTrackList` onremovetrack event handler is
when the removetrack event occurs, indicating that an audio track
been removed from the media element, and therefore also from
AudioTrackList.
`AudioTrackList.onremovetrack = eventHandler;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrackList/onremovetrack`"
[this val]
(aset this "onremovetrack" val))