-
Notifications
You must be signed in to change notification settings - Fork 0
/
MediaStreamConstraints.cljs
84 lines (63 loc) · 2.95 KB
/
MediaStreamConstraints.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
(ns web.audio.MediaStreamConstraints
"The MediaStreamConstraints dictionary is used when calling `getUserMedia()`
specify what kinds of tracks should be included in the returned
and, optionally, to establish constraints for those tracks' settings."
(:refer-clojure :exclude []))
(defn audio
"Property.
The `web.audio.MediaStreamConstraints` dictionary's audio property
used to indicate what kind of audio track, if any, should be
in the `web.streams.MediaStream` returned by a call to `getUserMedia()`.
`var audioConstraints = true | false | MediaTrackConstraints;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamConstraints/audio`"
[this]
(-> this (.-audio)))
(defn set-audio!
"Property.
The `web.audio.MediaStreamConstraints` dictionary's audio property
used to indicate what kind of audio track, if any, should be
in the `web.streams.MediaStream` returned by a call to `getUserMedia()`.
`var audioConstraints = true | false | MediaTrackConstraints;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamConstraints/audio`"
[this val]
(aset this "audio" val))
(defn video
"Property.
The `web.audio.MediaStreamConstraints` dictionary's video property
used to indicate what kind of video track, if any, should be
in the `web.streams.MediaStream` returned by a call to `getUserMedia()`.
`var videoConstraints = true | false | MediaTrackConstraints;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamConstraints/video`"
[this]
(-> this (.-video)))
(defn set-video!
"Property.
The `web.audio.MediaStreamConstraints` dictionary's video property
used to indicate what kind of video track, if any, should be
in the `web.streams.MediaStream` returned by a call to `getUserMedia()`.
`var videoConstraints = true | false | MediaTrackConstraints;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamConstraints/video`"
[this val]
(aset this "video" val))
(defn peer-identity
"Property.
A DOMString identifying the peer who has sole access to the stream.
this property is specified, only the indicated peer can receive
use the stream. Streams isolated in this way can only be displayed
a media element (<audio> or <video>) where the content is protected
as if CORS cross-origin rules were in effect. When a peer identity
set, MediaStreamTracks from that peer have their isolated flag
to true."
[this]
(-> this (.-peerIdentity)))
(defn set-peer-identity!
"Property.
A DOMString identifying the peer who has sole access to the stream.
this property is specified, only the indicated peer can receive
use the stream. Streams isolated in this way can only be displayed
a media element (<audio> or <video>) where the content is protected
as if CORS cross-origin rules were in effect. When a peer identity
set, MediaStreamTracks from that peer have their isolated flag
to true."
[this val]
(aset this "peerIdentity" val))