Copy of divisions getting created, when opentok subscribe or publisher connected


#1

Hi,

The ionic app version is 2.
Reference app link: https://github.com/opentok/opentok-ionic-samples/tree/master/Basic-Video-Chat

I am trying to use above example in one of my apps. When I tried to execute this example I am getting 2 layers for each division, out of those 2 layers of the same DIV, the bottom layer is in our control. which is a blank black box. And on top layer video is streaming, which we can not control(resize, scroll, apply CSS etc…)

And when I try to scroll HTML page or apply any CSS, JS operations to the div which I created. It is affecting to bottom layer DIVs.

After some googling, I realized that, OT.updateViews() or TB.updateViews() function will solve this issue, but no luck. :frowning:

Here is my code:

startCall() {
this.session = OT.initSession(this.apiKey, this.sessionId);
this.session.on({
streamCreated: (event) => {
var pubOptions = { publishAudio: true, publishVideo: true };
this.session.subscribe(event.stream, ‘subscriber’, pubOptions);
OT.updateViews();
},
streamDestroyed: (event) => {
console.log(Stream ${event.stream.name} ended because ${event.reason});
OT.updateViews();
}
});

this.session.connect(this.token, () => {
this.publisher = OT.initPublisher(‘publisher’);
this.session.publish(this.publisher);
OT.updateViews();
});
}

Thanks for the help in advance.