opentok-ios-sdk-samples-swift
opentok-ios-sdk-samples-swift copied to clipboard
Multiparty Sample: Getting Empty streamId if publisher disconnected
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()
}
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.
As if i am using self.setNeedsLayout()
in collection cell in order to get visual