Why is the container DIV destroyed when I publish or subscribe?

This is the correct behavior for the OpenTok JavaScript API. The element you pass into theSession.publish() or Session.subscribe() method is an HTML DOM element to be replaced. It is not a container element. You can create a container DIV element that contains another replacement element, and then pass that replacement element to theSession.publish() or Session.subscribe() method.


Have more questions? Submit a request