summaryrefslogtreecommitdiff
path: root/Source/WebCore/Modules/mediastream/MediaStreamTrack.idl
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/Modules/mediastream/MediaStreamTrack.idl')
-rw-r--r--Source/WebCore/Modules/mediastream/MediaStreamTrack.idl80
1 files changed, 52 insertions, 28 deletions
diff --git a/Source/WebCore/Modules/mediastream/MediaStreamTrack.idl b/Source/WebCore/Modules/mediastream/MediaStreamTrack.idl
index 68d5fb91c..ac033019a 100644
--- a/Source/WebCore/Modules/mediastream/MediaStreamTrack.idl
+++ b/Source/WebCore/Modules/mediastream/MediaStreamTrack.idl
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 Google Inc. All rights reserved.
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,45 +26,69 @@
enum MediaStreamTrackState { "new", "live", "ended" };
[
- Conditional=MEDIA_STREAM,
- EventTarget,
ActiveDOMObject,
+ Conditional=MEDIA_STREAM,
+ PrivateIdentifier,
+ PublicIdentifier,
SkipVTableValidation,
-] interface MediaStreamTrack {
+] interface MediaStreamTrack : EventTarget {
readonly attribute DOMString kind;
readonly attribute DOMString id;
readonly attribute DOMString label;
- attribute boolean enabled;
+ attribute boolean enabled;
readonly attribute boolean muted;
- attribute EventListener onmute;
- attribute EventListener onunmute;
+ attribute EventHandler onmute;
+ attribute EventHandler onunmute;
readonly attribute boolean _readonly;
readonly attribute boolean remote;
readonly attribute MediaStreamTrackState readyState;
- attribute EventListener onstarted;
- attribute EventListener onended;
-
- [CallWith=ScriptExecutionContext, RaisesException] static void getSources(MediaStreamTrackSourcesCallback callback);
-
- MediaTrackConstraints constraints();
+ attribute EventHandler onended;
- MediaSourceStates states();
-
- MediaStreamCapabilities capabilities(); // returns either AllVideoCapabilities or AllAudioCapabilities
-
- void applyConstraints(Dictionary constraints);
-
- attribute EventListener onoverconstrained;
MediaStreamTrack clone();
[ImplementedAs=stopProducingData] void stop();
- // EventTarget interface
- void addEventListener(DOMString type,
- EventListener listener,
- optional boolean useCapture);
- void removeEventListener(DOMString type,
- EventListener listener,
- optional boolean useCapture);
- [RaisesException] boolean dispatchEvent(Event event);
+ MediaTrackConstraints getConstraints();
+ MediaTrackSettings getSettings();
+ MediaTrackCapabilities getCapabilities();
+ Promise<void> applyConstraints(optional MediaTrackConstraints constraints);
+
+ attribute EventHandler onoverconstrained;
};
+[
+ Conditional=MEDIA_STREAM,
+ JSGenerateToJSObject,
+] dictionary MediaTrackCapabilities {
+ LongRange width;
+ LongRange height;
+ DoubleRange aspectRatio;
+ DoubleRange frameRate;
+ sequence<DOMString> facingMode;
+ DoubleRange volume;
+ LongRange sampleRate;
+ LongRange sampleSize;
+ sequence<boolean> echoCancellation;
+ // FIXME: add latency
+ // FIXME: add channelCount
+ DOMString deviceId;
+ DOMString groupId;
+};
+
+[
+ Conditional=MEDIA_STREAM,
+ JSGenerateToJSObject,
+] dictionary MediaTrackSettings {
+ long width;
+ long height;
+ double aspectRatio;
+ double frameRate;
+ DOMString facingMode;
+ double volume;
+ long sampleRate;
+ long sampleSize;
+ boolean echoCancellation;
+ // FIXME: add latency
+ // FIXME: add channelCount
+ DOMString deviceId;
+ DOMString groupId;
+};