-
Notifications
You must be signed in to change notification settings - Fork 0
/
AudioTrack.cljs
101 lines (70 loc) · 2.78 KB
/
AudioTrack.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
(ns web.audio.AudioTrack
"The AudioTrack interface represents a single audio track from
of the HTML media elements, `<audio>` or `<video>`."
(:refer-clojure :exclude []))
(defn enabled
"Property.
The `web.audio.AudioTrack` property enabled specifies whether
not the described audio track is currently enabled for use. If
track is disabled by setting enabled to false, the track is muted
does not produce audio.
`isAudioEnabled = AudioTrack.enabled;
AudioTrack.enabled = true | false;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/enabled`"
[this]
(-> this (.-enabled)))
(defn set-enabled!
"Property.
The `web.audio.AudioTrack` property enabled specifies whether
not the described audio track is currently enabled for use. If
track is disabled by setting enabled to false, the track is muted
does not produce audio.
`isAudioEnabled = AudioTrack.enabled;
AudioTrack.enabled = true | false;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/enabled`"
[this val]
(aset this "enabled" val))
(defn id
"Property.
The id property contains a string which uniquely identifies the
represented by the `web.audio.AudioTrack`.
`var trackID = AudioTrack.id;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/id`"
[this]
(-> this (.-id)))
(defn kind
"Property.
The kind property contains a string indicating the category of
contained in the `web.audio.AudioTrack`.
`var trackKind = AudioTrack.kind;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/kind`"
[this]
(-> this (.-kind)))
(defn label
"Property.
The read-only `web.audio.AudioTrack` property label returns a
specifying the audio track's human-readable label, if one is
otherwise, it returns an empty string.
`var audioTrackLabel = AudioTrack.label;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/label`"
[this]
(-> this (.-label)))
(defn language
"Property.
The read-only `web.audio.AudioTrack` property language returns
string identifying the language used in the audio track.
`var audioTrackLanguage = AudioTrack.language;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/language`"
[this]
(-> this (.-language)))
(defn source-buffer
"Property.
The read-only `web.audio.AudioTrack` property sourceBuffer returns
`web.audio.SourceBuffer` that created the track, or null if the
was not created by a `web.audio.SourceBuffer` or the `web.audio.SourceBuffer`
been removed from the `MediaSource.sourceBuffers` attribute of
parent media source.
`var sourceBuffer = AudioTrack.sourceBuffer;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/sourceBuffer`"
[this]
(-> this (.-sourceBuffer)))