OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // https://w3c.github.io/mediacapture-record/MediaRecorder.html#MediaRecorderAPI |
| 6 |
| 7 enum RecordingStateEnum { "inactive", "recording", "paused" }; |
| 8 |
| 9 [ |
| 10 GarbageCollected, |
| 11 ActiveDOMObject, |
| 12 // TODO(mcasas): consider changing |mimeType| to a dictionary with said key,
see https://github.com/w3c/mediacapture-record/issues/19 |
| 13 Constructor(MediaStream stream, [TreatUndefinedAs=Missing] optional DOMStrin
g mimeType), |
| 14 ConstructorCallWith=ExecutionContext, |
| 15 RaisesException=Constructor, |
| 16 RuntimeEnabled=MediaRecorder |
| 17 ] interface MediaRecorder : EventTarget { |
| 18 readonly attribute MediaStream stream; |
| 19 readonly attribute DOMString mimeType; |
| 20 readonly attribute RecordingStateEnum state; |
| 21 attribute boolean ignoreMutedMedia; |
| 22 |
| 23 attribute EventHandler onstart; |
| 24 attribute EventHandler onstop; |
| 25 attribute EventHandler ondataavailable; |
| 26 attribute EventHandler onpause; |
| 27 attribute EventHandler onresume; |
| 28 attribute EventHandler onerror; |
| 29 |
| 30 [RaisesException] void start(optional long timeslice); |
| 31 [RaisesException] void stop(); |
| 32 [RaisesException] void pause(); |
| 33 [RaisesException] void resume(); |
| 34 [RaisesException] void requestData(); |
| 35 |
| 36 static DOMString canRecordMimeType(DOMString mimeType); |
| 37 }; |
OLD | NEW |