Get a Quote. |
Connect these ways.WebShowing Offices Canada Suite 404 , 1688 152 St, Surrey, BC V4A 4N2 USA 525 University Ave, Palo Alto, CA 94301 Bookmark our App.
Just drag the icon to your bookmark bar above. Or add to homescreen on your phone. FULLY SECURE AND COMPLIANT.
|
/* Replace API key, SessionID, and token with values generated in https://tokbox.com/account/#/ in the project you want to use, or at https://tokbox.com/developer/tools/playground/. */ var apiKey = '46249892'; var sessionId = '2_MX40NjI0OTg5Mn5-MTU3NDgyNDQxMjUxNH4zV0JmTjVKekZVenlNRkdsNnVFZ3pMNDl-fg'; var token = 'T1==cGFydG5lcl9pZD00NjI0OTg5MiZzaWc9ODlmYjE0YWUxYWUzMzMxYWUxYTNkZDMxZjM5ZGU3YmQwMTliMzM4OTpzZXNzaW9uX2lkPTJfTVg0ME5qSTBPVGc1TW41LU1UVTNORGd5TkRReE1qVXhOSDR6VjBKbVRqVktla1pWZW5sTlJrZHNOblZGWjNwTU5EbC1mZyZjcmVhdGVfdGltZT0xNTc0ODI0NDI1Jm5vbmNlPTAuODA5MTYzMzUzOTAyODU1MSZyb2xlPXB1Ymxpc2hlciZleHBpcmVfdGltZT0xNTc3NDE2NDI0JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9'; /* ------------------------------ */ var publisher = null; initializeSession(); function initializeSession(){ var session = OT.initSession(apiKey, sessionId) session.on('streamCreated', function(event) { session.subscribe(event.stream); }); publisher = OT.initPublisher('camera-publisher'); session.connect(token, function(error) { if (error) { alert('Error connecting to session: ' + error.message); return; } else { session.publish(publisher); } }); } function switchCamera() { publisher.cycleVideo(); }