Skip to content

Instantly share code, notes, and snippets.

@jeffandersen
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffandersen/9572479 to your computer and use it in GitHub Desktop.
Save jeffandersen/9572479 to your computer and use it in GitHub Desktop.
GoInstant Audio & Video Chat
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title></title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.goinstant.net/v1/platform.min.js"></script>
<script type="text/javascript" src="https://cdn.goinstant.net/widgets/webrtc/latest/webrtc.min.js"></script>
<link rel="stylesheet" href="https://cdn.goinstant.net/widgets/webrtc/latest/webrtc.css" />
</head>
<body>
<!-- Put your html here -->
<script>
$(function() {
// Connect URL
var url = 'https://goinstant.net/jeffandersen/helloworld';
// Connect to GoInstant
goinstant.connect(url, function(err, platformObj, roomObj) {
if (err) {
throw err;
}
// Create a new instance of the WebRTC widget
var webrtc = new goinstant.widgets.WebRTC({
room: roomObj
});
// Initialize the WebRTC widget
webrtc.initialize(function(err) {
if (err) {
throw err;
}
// The widget should now be rendered on the page
});
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment