dom: Add WebRTC transceiver stubs.

This commit is contained in:
Josh Matthews 2020-07-14 12:10:13 -04:00
parent 1ae117f67b
commit 84efd56e57
9 changed files with 220 additions and 4 deletions

View file

@ -115,6 +115,22 @@ enum RTCSignalingState {
"closed"
};
dictionary RTCRtpCodingParameters {
DOMString rid;
};
dictionary RTCRtpEncodingParameters : RTCRtpCodingParameters {
boolean active = true;
unsigned long maxBitrate;
double scaleResolutionDownBy;
};
dictionary RTCRtpTransceiverInit {
RTCRtpTransceiverDirection direction = "sendrecv";
sequence<MediaStream> streams = [];
sequence<RTCRtpEncodingParameters> sendEncodings = [];
};
partial interface RTCPeerConnection {
// sequence<RTCRtpSender> getSenders();
// sequence<RTCRtpReceiver> getReceivers();
@ -122,8 +138,9 @@ partial interface RTCPeerConnection {
// RTCRtpSender addTrack(MediaStreamTrack track,
// MediaStream... streams);
// void removeTrack(RTCRtpSender sender);
// RTCRtpTransceiver addTransceiver((MediaStreamTrack or DOMString) trackOrKind,
// optional RTCRtpTransceiverInit init);
[Pref="dom.webrtc.transceiver.enabled"]
RTCRtpTransceiver addTransceiver((MediaStreamTrack or DOMString) trackOrKind,
optional RTCRtpTransceiverInit init = {});
attribute EventHandler ontrack;
};