Skip to content

Instantly share code, notes, and snippets.

@hbaqai
hbaqai / keybase.md
Created March 28, 2018 23:58
keybase.md

Keybase proof

I hereby claim:

  • I am hbaqai on github.
  • I am hashir (https://keybase.io/hashir) on keybase.
  • I have a public key ASAH4u8d_NZ3fIdhCfbYZF3OjZW2Y0rVrCuwGx7tGWy9SQo

To claim this, I am signing this object:

@hbaqai
hbaqai / index.html
Created January 20, 2018 18:24
CruzHacks2018
<!DOCTYPE HTML>
<html>
<body>
<script src="https://static.opentok.com/v2/js/opentok.js" charset="utf-8"></script>
<script charset="utf-8">
const apiKey = 'YOUR-API-KEY';
const sessionId = 'YOUR-SESSION-ID';
const token = 'YOUR-TOKEN';
const session = OT.initSession(apiKey, sessionId);
session.on({
@hbaqai
hbaqai / index.html
Created March 23, 2017 02:05
TokBox Access Dialogue Events
<!DOCTYPE HTML>
<html>
<body>
<script src="https://static.opentok.com/v2/js/opentok.js" charset="utf-8"></script>
<script charset="utf-8">
var apiKey = 'API_KEY';
var sessionId = 'SESSION_ID';
var token = 'TOKEN_ID';
var publisher;
var session = OT.initSession(apiKey, sessionId)
@hbaqai
hbaqai / settings.json
Created July 14, 2016 06:45
This is a settings.json file that should be in the .vscode directory. It points to a typescript definition files (d.ts)
// Place your settings in this file to overwrite default and user settings.
{
"typescript.tsdk": "./node_modules/typescript/lib"
}
@hbaqai
hbaqai / noCameraMic.html
Last active August 29, 2015 14:07
Handling No Camera and Mic Using OpenTok
<!DOCTYPE HTML>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://static.opentok.com/webrtc/v2.2/js/TB.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
//environment test
console.log("environment test: " + window.location.href.indexOf("http"));
@hbaqai
hbaqai / gist:ba5162485edb2dc4ad99
Created September 11, 2014 22:35
Restrict Framerate Example
<!DOCTYPE HTML>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://static.opentok.com/webrtc/v2.2/js/TB.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
//environment test
console.log("environment test: " + window.location.href.indexOf("http"));
<!DOCTYPE HTML>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://static.opentok.com/webrtc/v2.2/js/TB.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
//environment test
console.log("environment test: " + window.location.href.indexOf("http"));
@hbaqai
hbaqai / Step 2 - JS Writeup
Last active December 29, 2015 14:28
Step 2 - JS Writeup
Now that you've read through (link step1), you should have a conceptual understanding of how Opentok works. In this step we'll use that knowledge to set up a web page with live video chat.
We recommend that you follow tutorial step by step, entering code snippets as you go, but if you just want the end results you can find them at our github repo: (link github repo). You'll still need to have at least a web server set up. If you don't know how to do that you should at least read the following section.
SETTING UP A WEB SERVER
Before starting, you'll need to make sure you have a web server available. You can use a popular one like (link Apache) or (link Nginx), or if you wanted something quick and easy way would be to start one with python (Mac and Linux users typically have this preinstalled, Windows users click here). Once you have python running, open a terminal, get to a new empty directory, and type in the following line:
python -m SimpleHTTPServer 8000`
Any files placed here will be served at the addr