Hi, for my final year project at University I've created a social networking site for the Very Elderly. I've just transferred the website files from local WAMP config to a Web Hosted CPanel config today. Everything is all up and running apart from the Tokbox API. This is a video chat API which allows the web page to interact with the Tokbox servers to provide a video hosting experience. This was, and still is, working on my local WAMP server config. However, this isn't working on the CPanel config.
From what I can see, the API has been executed because the window is loaded up and a spinning circle indicating something is loading, however nothing is.
Below is the API Source Code. I was wondering if anyone's had issues like this before? I REALLY need to get this to work on a web hosted platform as I'm demoing this product next week.
Kindest regards,
Tim
From what I can see, the API has been executed because the window is loaded up and a spinning circle indicating something is loading, however nothing is.
Below is the API Source Code. I was wondering if anyone's had issues like this before? I REALLY need to get this to work on a web hosted platform as I'm demoing this product next week.
Kindest regards,
Tim
HTML:
<html>
<head></head>
<body>
<div id='myPublisherDiv'></div>
<div id='subscribersDiv'></div>
<script src='//static.opentok.com/v2/js/opentok.min.js'></script>
<script>
var apiKey = '45544512';
var sessionId = '1_MX40NTU0NDUxMn5-MTQ1OTk1ODQ3ODcwOH56OW5OcGMrTUorQlhNK1lpRGhQeHdPelJ-UH4';
var token = 'T1==cGFydG5lcl9pZD00NTU0NDUxMiZzaWc9OTk5NjU3YzI5ODIxYmI1N2FmOGFiZmY0OTdiNTZhMGI4YjA4NzI3NTpyb2xlPXB1Ymxpc2hlciZzZXNzaW9uX2lkPTFfTVg0ME5UVTBORFV4TW41LU1UUTFPVGsxT0RRM09EY3dPSDU2T1c1T2NHTXJUVW9yUWxoTksxbHBSR2hRZUhkUGVsSi1VSDQmY3JlYXRlX3RpbWU9MTQ1OTk1ODQ4MiZub25jZT0wLjQyMDgwMTM4OTA4NjY2MzMmZXhwaXJlX3RpbWU9MTQ2MjU1MDQ1MiZjb25uZWN0aW9uX2RhdGE9MQ===';
var session = OT.initSession(apiKey, sessionId);
session.on({
streamCreated: function(event) {
session.subscribe(event.stream, 'subscribersDiv', {insertMode: 'append'});
}
});
session.connect(token, function(error) {
if (error) {
console.log(error.message);
} else {
session.publish('myPublisherDiv', {width: 640, height: 480});
}
});
</script>
</body>
</html>