opentok-ios-sdk-samples-swift icon indicating copy to clipboard operation
opentok-ios-sdk-samples-swift copied to clipboard

Multiparty Sample: Getting Empty streamId if publisher disconnected

Open Abhishek9634 opened this issue 4 years ago • 2 comments

On publisher disconnection, getting stream id empty so in that case cell, video visual stuck there. Please help we have a demo tomorrow.

Console log attached

    func session(_ session: OTSession, streamDestroyed stream: OTStream) {
        print("Session streamDestroyed: \(stream.streamId)")
        guard let (index, subscriber) = self.findSubscriber(
            byStreamId: stream.streamId
            ) else {
            return
        }
        subscriber.view?.removeFromSuperview()
        self.subscribers.removeValue(forKey: index)
        // UPDATE UI
        (self.delegate as? SubscriberSessionDelegate)?.streamDestroyed()
    }
Screenshot 2020-05-22 at 9 20 26 PM

Abhishek9634 avatar May 22 '20 15:05 Abhishek9634

Well Initially i was using singleton class, May be that could be the root cause. But Still my actual problem is not solved. when i disconnect publisher and re-connect to same session. I am getting his audio only i.e not the video.

Abhishek9634 avatar May 23 '20 04:05 Abhishek9634

As if i am using self.setNeedsLayout() in collection cell in order to get visual

Abhishek9634 avatar May 23 '20 05:05 Abhishek9634