Open akryzhanovskiy opened 3 weeks ago
@djova-dolby @Yousif-CS can you please take a look?
HEy @akryzhanovskiy Thanks for reporting this. Just want to make sure, did you verify credentials are set properly the second time around?
@Yousif-CS yes, credentials are set correctly.
Hi @akryzhanovskiy we were able to replicate the issue on our end. I am hoping to get a fix for it in the 2.1.0 SDK which is coming out soon. In the meantime, are you able to recreate the subscriber instance when attempting to connect to a different stream?
One important point to mention is that you will need to get rid of any references to MCRTSRemoteTrack
in your app when you destroy MCSubscriber
, since their lifetime depends on MCSubscriber
.
@Yousif-CS yes, this is the way I'm doing right now. I have to remove subscriber and then initialise new one.
Thank you for your response. Hope this issue will be fixed next release.
Can you please help with next situation with subscribing:
func subscriber(_ subscriber: MCSubscriber, didReceiveRTSRemoteTrack rtsRemoteTrack: MCRTSRemoteTrack) { if let videoTrack = rtsRemoteTrack.asVideo(), let renderer = videoRenderer { videoTrack.enable(renderer: renderer) { [weak self] error in self?.videoTrack = videoTrack self?.videoTrack?.delegate = self } } else if let audioTrack = rtsRemoteTrack.asAudio() { audioTrack.enable { [weak self] error in self?.audioTrack = audioTrack } } }
And at this point we get callbacks that we connected and subscribed successfully, but delegate method didReceiveRTSRemoteTrack is not called, so video track and audio track are not updated and we still see video from the first stream.
Can you please tell what is wrong with this flow?