Embed a #Skype-like chat in your webpage @tokbox
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.
- When prompted, grant access to your camera and microphone.
- The video from your webcam should appear in the browser.
- Mute your speaker.
- Copy the URI in the browser to your Clipboard.
- Open a new tab.
- 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!
<!DOCTYPE HTML>
<html>
<body>
https://static.opentok.com/v2/js/opentok.jsvar 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>