OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // https://w3c.github.io/mediacapture-record/MediaRecorder.html#MediaRecorderAPI | 5 // https://w3c.github.io/mediacapture-record/MediaRecorder.html#MediaRecorderAPI |
Peter Beverloo
2015/12/09 23:11:29
Mm. The GitHub repository uses both the gh-pages b
mcasas
2015/12/10 02:16:59
I was also uncertain about it so I pinged the appr
| |
6 | 6 |
7 enum RecordingStateEnum { "inactive", "recording", "paused" }; | 7 enum RecordingState { "inactive", "recording", "paused" }; |
8 | 8 |
9 [ | 9 [ |
10 GarbageCollected, | 10 GarbageCollected, |
11 ActiveDOMObject, | 11 ActiveDOMObject, |
12 // TODO(mcasas): consider changing |mimeType| to a dictionary with said key, see https://github.com/w3c/mediacapture-record/issues/19 | 12 // TODO(mcasas): consider changing |mimeType| to a dictionary with said key, see https://github.com/w3c/mediacapture-record/issues/19 |
Peter Beverloo
2015/12/09 23:11:29
I see that Philip also pointed this out, but since
mcasas
2015/12/10 02:16:59
I agree and is being done here: http://crrev.com/1
| |
13 // TODO(mcasas): Remove [TreatUndefinedAs], see https://github.com/w3c/media capture-record/issues/7 | 13 Constructor(MediaStream stream, optional DOMString mimeType), |
14 Constructor(MediaStream stream, [TreatUndefinedAs=Missing] optional DOMStrin g mimeType), | |
15 ConstructorCallWith=ExecutionContext, | 14 ConstructorCallWith=ExecutionContext, |
16 RaisesException=Constructor, | 15 RaisesException=Constructor, |
17 RuntimeEnabled=MediaRecorder, | 16 RuntimeEnabled=MediaRecorder, |
18 ] interface MediaRecorder : EventTarget { | 17 ] interface MediaRecorder : EventTarget { |
19 readonly attribute MediaStream stream; | 18 readonly attribute MediaStream stream; |
20 readonly attribute DOMString mimeType; | 19 readonly attribute DOMString mimeType; |
21 readonly attribute RecordingStateEnum state; | 20 readonly attribute RecordingState state; |
22 attribute boolean ignoreMutedMedia; | 21 attribute boolean ignoreMutedMedia; |
Peter Beverloo
2015/12/09 23:11:29
micro nit: it's easier to confirm how well we matc
mcasas
2015/12/10 02:16:59
Done.
| |
23 | 22 |
24 attribute EventHandler onstart; | 23 attribute EventHandler onstart; |
25 attribute EventHandler onstop; | 24 attribute EventHandler onstop; |
26 attribute EventHandler ondataavailable; | 25 attribute EventHandler ondataavailable; |
27 attribute EventHandler onpause; | 26 attribute EventHandler onpause; |
28 attribute EventHandler onresume; | 27 attribute EventHandler onresume; |
29 attribute EventHandler onerror; | 28 attribute EventHandler onerror; |
30 | 29 |
31 [RaisesException] void start(optional long timeslice); | 30 [RaisesException] void start(optional long timeslice); |
32 [RaisesException] void stop(); | 31 [RaisesException] void stop(); |
33 [RaisesException] void pause(); | 32 [RaisesException] void pause(); |
34 [RaisesException] void resume(); | 33 [RaisesException] void resume(); |
35 [RaisesException] void requestData(); | 34 [RaisesException] void requestData(); |
36 | 35 |
37 static DOMString canRecordMimeType(DOMString mimeType); | 36 static DOMString canRecordMimeType(DOMString mimeType); |
38 }; | 37 }; |
OLD | NEW |