File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1465,13 +1465,14 @@ class iosrtcPlugin : CDVPlugin {
14651465 return
14661466 }
14671467
1468- if let trackId = trackId, let pluginMediaStreamTrack = self . pluginMediaStreamTracks [ trackId] {
1468+ let pluginMediaStreamTrack = trackId != nil ? self . pluginMediaStreamTracks [ trackId!] : nil ;
1469+ if trackId == nil || pluginMediaStreamTrack != nil {
14691470 pluginRTCRptSender. replaceTrack ( pluginMediaStreamTrack)
14701471 self . emit ( command. callbackId,
14711472 result: CDVPluginResult (
14721473 status: CDVCommandStatus_OK,
14731474 messageAs: [
1474- " track " : pluginMediaStreamTrack. getJSON ( )
1475+ " track " : pluginMediaStreamTrack? . getJSON ( )
14751476 ] ) )
14761477 } else {
14771478 NSLog ( " iosrtcPlugin#RTCPeerConnection_RTCRtpSender_replaceTrack() | ERROR: Unable to find track " )
You can’t perform that action at this time.
0 commit comments