Home > Uncategorized > Embed a #Skype-like chat in your webpage @tokbox

Embed a #Skype-like chat in your webpage @tokbox

opentok

I had a quick look on the internet to see if it was easy to embed Skype / Facetime / or Google talk in a website, and although it seems possible to embed Skype – MDLive did it, but only in partnership with Microsoft, so I don’t think it’s open to all. Facetime seems completely closed.

  However, I did come across another company that does it; try page out;
(https://) is required.
The instructions are as follows;
  1. When prompted, grant access to your camera and microphone.
  2. The video from your webcam should appear in the browser.
  3. Mute your speaker.
  4. Copy the URI in the browser to your Clipboard.
  5. Open a new tab.
  6. Paste the URI into the new tab. Now you should have two videos.
    Tip: If you have a public address, share the path with a friend for a real video chat!
 
It’s from a company called Tokbox, and their base fee is $50 a month. 
The code is below, since you can easily see it from a view-source, so the passwords aren’t secure;
<!DOCTYPE HTML>
<html>
<body>
https://static.opentok.com/v2/js/opentok.js

var apiKey = ‘45708032’;
var sessionId = ‘1_MX40NTcwODAzMn5-MTQ3NzM4MDMxNTE4MH5HUE1rUzlOVlFxb0VDU0FscWRFbXFNdkd-fg’;
var token = ‘T1==cGFydG5lcl9pZD00NTcwODAzMiZzaWc9NWNlMDdkNWExM2Y2MTEzYjFkM2VlZmVjNzg4Zjg0ZTI5ZjY4NTJjZDpzZXNzaW9uX2lkPTFfTVg0ME5UY3dPREF6TW41LU1UUTNOek00TURNeE5URTRNSDVIVUUxclV6bE9WbEZ4YjBWRFUwRnNjV1JGYlhGTmRrZC1mZyZjcmVhdGVfdGltZT0xNDc3MzgwMzQyJm5vbmNlPTAuNjc1MjYyNzQ4NDk2NjA3JnJvbGU9cHVibGlzaGVyJmV4cGlyZV90aW1lPTE0Nzk5NzU5NDQ=’;
var session = OT.initSession(apiKey, sessionId)
.on(‘streamCreated’, function(event) {
session.subscribe(event.stream);
})
.connect(token, function(error) {
var publisher = OT.initPublisher();
session.publish(publisher);
});

</body>
</html>

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment