OpenTok publisher's view becomes black when application enters in foreground
Asked Answered
L

0

7

In my one to one video calling app using OpenTok, the publisher's view becomes black after it goes to background mode and enters foreground. The subscriber is also not able to see the view(only seeing black box).

I am setting the publisher and subscriber properties as such:

publisher.publishVideo = true

subscriber.subscribeToVideo = true

Any solution will be very helpful.

Lectra answered 8/11, 2018 at 12:55 Comment(8)
TokBox Developer Evangelist here. Could you please share which platform you're using? (iOS or Android)Popular
We are using iOS platformBroderick
It's important to note that you need to make some changes so you can run the application in background mode while in an OpenTok Session and reclaim the publisher's video when you come back into foreground. For more information, please visit: tokbox.com/developer/sdks/ios/background-state.htmlPopular
i am calling doPublish() Again when application comes in foreground but it gives me a error in result. ' Error Domain=OTSessionErrorDomain Code=1011 "(null)" ' here is my code, lazy var publisher: OTPublisher = { let settings = OTPublisherSettings() settings.videoTrack = isVideoEnable settings.audioTrack = true settings.name = UIDevice.current.name return OTPublisher(delegate: self, settings: settings)! }(Lectra
func doPublish() { publisher.publishAudio = true publisher.publishVideo = true publisher.cameraPosition = .front session?.publish(publisher, error: &error) guard error == nil else { print(error!) return } guard publisher.view != nil else { return } publishView = publisher.view }Lectra
Hey Syed, you cannot publish the same publisher when it's already publishing. Could you file an issue in the following repo so I can help you debug further? github.com/opentok/opentok-ios-sdk-samples-swiftPopular
Done! github.com/opentok/opentok-ios-sdk-samples-swift/issues/75Lectra
I'm also seeing this issue on android.Citadel

© 2022 - 2024 — McMap. All rights reserved.