mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
dom: Add WebRTC transceiver stubs.
This commit is contained in:
parent
1ae117f67b
commit
84efd56e57
9 changed files with 220 additions and 4 deletions
|
@ -8,12 +8,12 @@ use crate::dom::bindings::codegen::Bindings::RTCIceCandidateBinding::RTCIceCandi
|
|||
use crate::dom::bindings::codegen::Bindings::RTCPeerConnectionBinding::RTCPeerConnectionMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::RTCPeerConnectionBinding::{
|
||||
RTCAnswerOptions, RTCBundlePolicy, RTCConfiguration, RTCIceConnectionState,
|
||||
RTCIceGatheringState, RTCOfferOptions, RTCSignalingState,
|
||||
RTCIceGatheringState, RTCOfferOptions, RTCRtpTransceiverInit, RTCSignalingState,
|
||||
};
|
||||
use crate::dom::bindings::codegen::Bindings::RTCSessionDescriptionBinding::{
|
||||
RTCSdpType, RTCSessionDescriptionInit,
|
||||
};
|
||||
use crate::dom::bindings::codegen::UnionTypes::StringOrStringSequence;
|
||||
use crate::dom::bindings::codegen::UnionTypes::{MediaStreamTrackOrString, StringOrStringSequence};
|
||||
use crate::dom::bindings::error::Error;
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
|
@ -32,6 +32,7 @@ use crate::dom::rtcdatachannel::RTCDataChannel;
|
|||
use crate::dom::rtcdatachannelevent::RTCDataChannelEvent;
|
||||
use crate::dom::rtcicecandidate::RTCIceCandidate;
|
||||
use crate::dom::rtcpeerconnectioniceevent::RTCPeerConnectionIceEvent;
|
||||
use crate::dom::rtcrtptransceiver::RTCRtpTransceiver;
|
||||
use crate::dom::rtcsessiondescription::RTCSessionDescription;
|
||||
use crate::dom::rtctrackevent::RTCTrackEvent;
|
||||
use crate::dom::window::Window;
|
||||
|
@ -744,6 +745,15 @@ impl RTCPeerConnectionMethods for RTCPeerConnection {
|
|||
) -> DomRoot<RTCDataChannel> {
|
||||
RTCDataChannel::new(&self.global(), &self, label, init, None)
|
||||
}
|
||||
|
||||
/// https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-addtransceiver
|
||||
fn AddTransceiver(
|
||||
&self,
|
||||
_track_or_kind: MediaStreamTrackOrString,
|
||||
init: &RTCRtpTransceiverInit,
|
||||
) -> DomRoot<RTCRtpTransceiver> {
|
||||
RTCRtpTransceiver::new(&self.global(), init.direction)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<SessionDescription> for RTCSessionDescriptionInit {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue