-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Can you please help with next situation with subscribing:
- We initialize MCSubscriber with delegate
- We set credentials for subscriber
- Then we call subscriber.connect() and subscriber.subscribe()
- After that we receive video and audio tracks with delegate method
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 } } }
- Then we try to another stream, so we call subscriber.unsubscribe() and subscriber.disconnect()
- Change credentials (streamName and token)
- And call subscriber.connect() and subscriber.subscribe() one more time.
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?