Skip to content

Commit b6cd809

Browse files
logist322rainliu
authored andcommitted
Init commit
1 parent 5e386a9 commit b6cd809

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

webrtc/src/api/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,14 @@ impl API {
168168
)
169169
.await
170170
}
171+
172+
pub fn setting_engine(&self) -> Arc<SettingEngine> {
173+
Arc::clone(&self.setting_engine)
174+
}
175+
176+
pub fn media_engine(&self) -> Arc<MediaEngine> {
177+
Arc::clone(&self.media_engine)
178+
}
171179
}
172180

173181
#[derive(Default)]

webrtc/src/peer_connection/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2073,4 +2073,12 @@ impl RTCPeerConnection {
20732073

20742074
gathering_complete_rx
20752075
}
2076+
2077+
pub fn dtls_transport(&self) -> Arc<RTCDtlsTransport> {
2078+
Arc::clone(&self.internal.dtls_transport)
2079+
}
2080+
2081+
pub async fn add_transceiver(&self, t: Arc<RTCRtpTransceiver>) {
2082+
self.internal.add_rtp_transceiver(t).await
2083+
}
20762084
}

webrtc/src/rtp_transceiver/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ pub struct RTCRtpTransceiver {
192192
}
193193

194194
impl RTCRtpTransceiver {
195-
pub(crate) async fn new(
195+
pub async fn new(
196196
receiver: Arc<RTCRtpReceiver>,
197197
sender: Arc<RTCRtpSender>,
198198
direction: RTCRtpTransceiverDirection,

0 commit comments

Comments
 (0)