Closed vikas0vanvi closed 7 years ago
nvm i had to set timeout for this
setTimeout(function () {
// Very simple OpenTok Code for group video chat
var publisher = TB.initPublisher(apiKey, 'myPublisherDiv');
var session = TB.initSession(apiKey, sessionId);
session.on({
'streamCreated': function (event) {
var div = document.createElement('div');
div.setAttribute('id', 'stream' + event.stream.streamId);
document.body.appendChild(div);
session.subscribe(event.stream, div.id, { subscribeToAudio: false });
}
});
session.connect(token, function () {
session.publish(publisher);
});
}, 10000)
i have included cordova.js in index.html still its showing cordova is not defined , i am testing it on device. any solution for this please ??