RTCTrackEvent.webidl (1173B)
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 4 * You can obtain one at http://mozilla.org/MPL/2.0/. 5 * 6 * The origin of this IDL file is 7 * http://w3c.github.io/webrtc-pc/#idl-def-RTCTrackEvent 8 */ 9 10 dictionary RTCTrackEventInit : EventInit { 11 required RTCRtpReceiver receiver; 12 required MediaStreamTrack track; 13 sequence<MediaStream> streams = []; 14 required RTCRtpTransceiver transceiver; 15 }; 16 17 [Pref="media.peerconnection.enabled", 18 Exposed=Window] 19 interface RTCTrackEvent : Event { 20 constructor(DOMString type, RTCTrackEventInit eventInitDict); 21 22 readonly attribute RTCRtpReceiver receiver; 23 readonly attribute MediaStreamTrack track; 24 25 // TODO: Use FrozenArray once available. (Bug 1236777) 26 // readonly attribute FrozenArray<MediaStream> streams; 27 28 [Frozen, Cached, Pure] 29 readonly attribute sequence<MediaStream> streams; // workaround 30 readonly attribute RTCRtpTransceiver transceiver; 31 };