コード例 #1
0
 public IRTCRtpTransceiver AddTransceiver(IMediaStreamTrack track, RTCRtpTransceiverInit init)
 {
     if (init is null)
     {
         return(RTCRtpTransceiver.Create(((Webrtc.RTCPeerConnection)NativeObject).AddTransceiverWithTrack(
                                             (Webrtc.RTCMediaStreamTrack)track.NativeObject)));
     }
     else
     {
         return(RTCRtpTransceiver.Create(((Webrtc.RTCPeerConnection)NativeObject).AddTransceiverWithTrack(
                                             (Webrtc.RTCMediaStreamTrack)track.NativeObject, init.ToNative())));
     }
 }
コード例 #2
0
 public IRTCRtpTransceiver AddTransceiver(MediaStreamTrackKind kind, RTCRtpTransceiverInit init)
 {
     if (init is null)
     {
         return(RTCRtpTransceiver.Create(((Webrtc.RTCPeerConnection)NativeObject).AddTransceiverOfType(
                                             kind.ToNative())));
     }
     else
     {
         return(RTCRtpTransceiver.Create(((Webrtc.RTCPeerConnection)NativeObject).AddTransceiverOfType(
                                             kind.ToNative(), init.ToNative())));
     }
 }
コード例 #3
0
 public IRTCRtpTransceiver[] GetTransceivers() =>
 ((Webrtc.RTCPeerConnection)NativeObject).Transceivers
 .Select(nativeTransceiver => RTCRtpTransceiver.Create(nativeTransceiver)).ToArray();