Skip to content

Video track and Audio track are not updated if credentials are changed for Subscriber. #29

@akryzhanovskiy

Description

@akryzhanovskiy

Can you please help with next situation with subscribing:

  1. We initialize MCSubscriber with delegate
  2. We set credentials for subscriber
  3. Then we call subscriber.connect() and subscriber.subscribe()
  4. 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 } } }

  1. Then we try to another stream, so we call subscriber.unsubscribe() and subscriber.disconnect()
  2. Change credentials (streamName and token)
  3. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions