File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1693,10 +1693,10 @@ impl RTCPeerConnection {
1693
1693
}
1694
1694
1695
1695
/// add_transceiver_from_track Create a new RtpTransceiver(SendRecv or SendOnly) and add it to the set of transceivers.
1696
- pub async fn add_transceiver_from_track (
1697
- & self ,
1698
- track : & Arc < dyn TrackLocal + Send + Sync > , //Why compiler complains if "track: Arc<dyn TrackLocal + Send + Sync>"?
1699
- init : & [ RTCRtpTransceiverInit ] ,
1696
+ pub async fn add_transceiver_from_track < ' a > (
1697
+ & ' a self ,
1698
+ track : Arc < dyn TrackLocal + Send + Sync > ,
1699
+ init : & ' a [ RTCRtpTransceiverInit ] ,
1700
1700
) -> Result < Arc < RTCRtpTransceiver > > {
1701
1701
if self . internal . is_closed . load ( Ordering :: SeqCst ) {
1702
1702
return Err ( Error :: ErrConnectionClosed ) ;
@@ -1710,7 +1710,7 @@ impl RTCPeerConnection {
1710
1710
1711
1711
let t = self
1712
1712
. internal
1713
- . new_transceiver_from_track ( direction, Arc :: clone ( track) )
1713
+ . new_transceiver_from_track ( direction, track)
1714
1714
. await ?;
1715
1715
1716
1716
self . internal . add_rtp_transceiver ( Arc :: clone ( & t) ) . await ;
You can’t perform that action at this time.
0 commit comments