Last active
August 29, 2015 13:57
-
-
Save jeffandersen/9572479 to your computer and use it in GitHub Desktop.
GoInstant Audio & Video Chat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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