Search code examples
swiftwebrtcopentoktokbox

opentok: publisher and subscriber video shows same


I am using opentok(tokbox) for a video chat app. I tried swift code provided by the developer. hen I run the code in device, both publisher and subscriber shows the camera input of the device only.I tried with two device with same session and token. Please advice


Solution

  • I'm guessing you're using the opentok-ios-sdk-samples-swift repo with the Basic Video Chat Example. It is setup to subscribe to yourself so that you can see it working. If you don't want to subscribe to yourself set the subscribeToSelf variable to false here: https://github.com/opentok/opentok-ios-sdk-samples-swift/blob/master/Basic-Video-Chat/Basic-Video-Chat/ViewController.swift#L38