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 |
6 | 6 |
7 enum RecordingState { "inactive", "recording", "paused" }; | 7 enum RecordingState { "inactive", "recording", "paused" }; |
8 | 8 |
9 [ | 9 [ |
10 ActiveScriptWrappable, | 10 ActiveScriptWrappable, |
11 ConstructorCallWith=ExecutionContext, | 11 ConstructorCallWith=ExecutionContext, |
12 Constructor(MediaStream stream, optional MediaRecorderOptions options), | 12 Constructor(MediaStream stream, optional MediaRecorderOptions options), |
13 DependentLifetime, | 13 DependentLifetime, |
14 GarbageCollected, | |
15 RaisesException=Constructor, | 14 RaisesException=Constructor, |
16 RuntimeEnabled=MediaRecorder, | 15 RuntimeEnabled=MediaRecorder, |
17 ] interface MediaRecorder : EventTarget { | 16 ] interface MediaRecorder : EventTarget { |
18 readonly attribute MediaStream stream; | 17 readonly attribute MediaStream stream; |
19 readonly attribute DOMString mimeType; | 18 readonly attribute DOMString mimeType; |
20 readonly attribute RecordingState state; | 19 readonly attribute RecordingState state; |
21 | 20 |
22 attribute EventHandler onstart; | 21 attribute EventHandler onstart; |
23 attribute EventHandler onstop; | 22 attribute EventHandler onstop; |
24 attribute EventHandler ondataavailable; | 23 attribute EventHandler ondataavailable; |
25 attribute EventHandler onpause; | 24 attribute EventHandler onpause; |
26 attribute EventHandler onresume; | 25 attribute EventHandler onresume; |
27 attribute EventHandler onerror; | 26 attribute EventHandler onerror; |
28 attribute boolean ignoreMutedMedia; | 27 attribute boolean ignoreMutedMedia; |
29 readonly attribute unsigned long videoBitsPerSecond; | 28 readonly attribute unsigned long videoBitsPerSecond; |
30 readonly attribute unsigned long audioBitsPerSecond; | 29 readonly attribute unsigned long audioBitsPerSecond; |
31 | 30 |
32 [RaisesException] void start(optional long timeslice); | 31 [RaisesException] void start(optional long timeslice); |
33 [RaisesException] void stop(); | 32 [RaisesException] void stop(); |
34 [RaisesException] void pause(); | 33 [RaisesException] void pause(); |
35 [RaisesException] void resume(); | 34 [RaisesException] void resume(); |
36 [RaisesException] void requestData(); | 35 [RaisesException] void requestData(); |
37 | 36 |
38 static boolean isTypeSupported(DOMString type); | 37 static boolean isTypeSupported(DOMString type); |
39 }; | 38 }; |
OLD | NEW |