Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable/Disable track from Receiver/Sender is broken in case of use with Janus Videoroom #734

Closed
3 tasks done
RSATom opened this issue Jan 20, 2022 · 5 comments · Fixed by #735
Closed
3 tasks done

Comments

@RSATom
Copy link
Contributor

RSATom commented Jan 20, 2022

  • I have used Google with the error message or bug in association with the library and Cordova words to make sure the issue I'm reporting is only related to iOSRTC.
  • I have provided steps to reproduce (e.g. using sample app code https://github.com/cordova-rtc/cordova-plugin-iosrtc-sample or updated extra/renderer-and-libwebrtc-tests.js file).
  • I have provided versions of third party library name, ios, Xcode and plugin version and adapter.js version if used.

Versions affected

  • Cordova version (e.g 7.1.0): 11.0.0
  • Cordova iOS version (e.g 5.1.0): 6.2.0
  • Plugin version (e.g 6.0.12): master
  • iOS version (e.g 10.2): 15.2.1
  • Xcode version (e.g 11.1 - 11A1027): 13.2.1 (13C100)
  • WebRTC-adapter version (e.g. 7.4.0): 7.4.0
  • WebRTC Framework version (e.g. JSSip 3.1.2): Janus v0.11.6

Description

If try disable tracks gotten from receivers list on official Janus Videoroom demo I get following error in XCode debug console:

HelloVideoroom[383:7666] iosrtcPlugin#MediaStreamTrack_setEnabled() | ERROR: pluginMediaStreamTrack with id=janusa0 does not exist

Steps to reproduce

feeds.forEach(remoteFeed => {
        if(remoteFeed) {
                let peerConnection = remoteFeed.webrtcStuff.pc;
                if (peerConnection) {
                        const receivers = peerConnection.getReceivers();
                        receivers.forEach((receiver) => {
                                receiver.track.enabled = false;
                        })
                }
        }
})

Expected results

Track should be switched to disabled state

Actual results

Above error message

Investigation results

The problem is here:

self.id = rtcMediaStreamTrack.trackId + "_" + UUID().uuidString;

and here:
return self.rtcPeerConnection.transceivers.map({ (transceiver: RTCRtpTransceiver) -> NSDictionary in

i.e. on one side iosrtc alters track id to make it unique, but on other side iosrtc returns tracks from transeivers as is without replace original track id to internal iosrtc's track id.

@hthetiot
Copy link
Contributor

Thx @RSATom i will see what I can do.
Keep posted.

RSATom added a commit to RSATom/cordova-plugin-iosrtc that referenced this issue Jan 20, 2022
RSATom added a commit to RSATom/cordova-plugin-iosrtc that referenced this issue Jan 20, 2022
@hthetiot
Copy link
Contributor

May be this PR can fix the issue also #648

@hthetiot
Copy link
Contributor

hthetiot commented Mar 9, 2022

I have a one million dollars question, do they use unique Id for Media stream lines in SDP?

@RSATom
Copy link
Contributor Author

RSATom commented Mar 9, 2022

@hthetiot within specific SDP - I think yes.

@hthetiot hthetiot added this to the 8.0.x milestone May 12, 2022
RSATom added a commit to RSATom/cordova-plugin-iosrtc that referenced this issue May 15, 2022
RSATom added a commit to RSATom/cordova-plugin-iosrtc that referenced this issue May 15, 2022
RSATom added a commit to RSATom/cordova-plugin-iosrtc that referenced this issue May 15, 2022
RSATom added a commit to RSATom/cordova-plugin-iosrtc that referenced this issue May 15, 2022
RSATom added a commit to RSATom/cordova-plugin-iosrtc that referenced this issue Jun 16, 2022
RSATom added a commit to RSATom/cordova-plugin-iosrtc that referenced this issue Jun 16, 2022
@hthetiot
Copy link
Contributor

if PR QA pass, will release as part of 8.0.4

@hthetiot hthetiot self-assigned this Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants