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 name="description" content="Facetime OpenTok" /> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style> | |
#myPublisherDiv{ | |
position: fixed; | |
bottom: 0; |
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
window.TEST = {} | |
session = "" | |
publisher = "" | |
subscribers = {} | |
TEST.start = () -> | |
apiKey = "25925352" | |
sid = "1_MX4yNTkyNTM1Mn5-V2VkIFNlcCAwNCAxNDozODozNSBQRFQgMjAxM34wLjk4OTE2MjJ-" | |
token = "T1==cGFydG5lcl9pZD0yNTkyNTM1MiZzaWc9MWM2YmVkNDBiMzdhODk1OWNlODc2MzU1NjU0Y2U0YmVlZDAxNGM0Yzpyb2xlPXB1Ymxpc2hlciZzZXNzaW9uX2lkPTFfTVg0eU5Ua3lOVE0xTW41LVYyVmtJRk5sY0NBd05DQXhORG96T0Rvek5TQlFSRlFnTWpBeE0zNHdMams0T1RFMk1qSi0mY3JlYXRlX3RpbWU9MTM3ODMzMDcxNiZub25jZT0wLjMzMTkxMTA2MjQyOTM4MDU=" | |
publisher = TB.initPublisher( apiKey, "myPublisherDiv", {width: 120, height: 90} ) | |
session = TB.initSession( sid ) |
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
session = "" | |
publisher = "" | |
subscribeToStreams = (streams)-> | |
console.log "subscribeToStreams" | |
i = 0 | |
for e in streams | |
console.log "loop#{i}" | |
i += 1 | |
if (e.connection.connectionId == session.connection.connectionId) |
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
window.OTGroupChat = function(apiKey, sessionId, token){ | |
// Create the div to put the publisher element in to | |
var pubDiv = document.createElement('div'); | |
pubDiv.setAttribute('id', "OpenTokPublisher"); | |
document.body.appendChild( pubDiv ); | |
var publisher = TB.initPublisher(apiKey, pubDiv.id); | |
var session = TB.initSession(sessionId); | |
session.addEventListener('sessionConnected', function(event){ | |
session.publish( publisher ); |
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
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import com.gracenote.mmid.MobileSDK.GNAlbumIDFileError; | |
import com.gracenote.mmid.MobileSDK.GNAlbumIDSearchResult; | |
import com.gracenote.mmid.MobileSDK.GNAudioConfig; | |
import com.gracenote.mmid.MobileSDK.GNAudioSourceDelegate; | |
import com.gracenote.mmid.MobileSDK.GNAudioSourceMic; |
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
require 'pony' | |
#configuration | |
senderEmail => "yourName@domain.com" | |
sendGridUser => "Your sendgrid username" | |
sendGridPassword => "Your sendgrid password" | |
#email list: name => email | |
users = | |
{ | |
"user1" => "user1@gmail.com", |
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
/* OT.LayoutContainer | |
* | |
* in_options can be {vid_class: "your_class_name", sub_options: {}} | |
*/ | |
var LayoutContainer = function(in_session, in_container_div, in_options) { | |
// private variables | |
var session = in_session; | |
var container = null; | |
var options = in_options; |
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
class VChat | |
constructor: (@apiKey, @sessionId, @token) -> | |
@publisher = TB.initPublisher(@apiKey, 'myPublisherDiv') | |
@session = TB.initSession( @sessionId ) | |
@session.addEventListener('sessionConnected', @sessionConnectedHandler) | |
@session.addEventListener('streamCreated', @streamCreatedHandler) | |
@session.connect(@apiKey, @token) | |
return | |
sessionConnectedHandler: (event) => | |
@session.publish( @publisher ) |
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
var apiKey = '16178811'; | |
var sessionId = '1_MX4xNjE3ODgxMX4xMjcuMC4wLjF-RnJpIERlYyAxNCAxODoyMDo1NyBQU1QgMjAxMn4wLjMwMDcxMDM4fg'; | |
var token = 'T1==cGFydG5lcl9pZD0xNjE3ODgxMSZzaWc9OTM0YzJmYjk3YTZjMmY0ZmIzODFiZjE0YjMxNzZlMDVlYTQ4MDJjZDpzZXNzaW9uX2lkPTFfTVg0eE5qRTNPRGd4TVg0eE1qY3VNQzR3TGpGLVJuSnBJRVJsWXlBeE5DQXhPRG95TURvMU55QlFVMVFnTWpBeE1uNHdMak13TURjeE1ETTRmZyZjcmVhdGVfdGltZT0xMzU1NTM4MDY1JmV4cGlyZV90aW1lPTEzNTgxMzAwNjUmcm9sZT1wdWJsaXNoZXImY29ubmVjdGlvbl9kYXRhPSZub25jZT0xNTY3MA=='; | |
TB.setLogLevel(TB.DEBUG); | |
var session = TB.initSession(sessionId); | |
session.addEventListener('sessionConnected', sessionConnectedHandler); | |
session.addEventListener('streamCreated', streamCreatedHandler); | |
session.connect(apiKey, token); |
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
<script src="http://code.jquery.com/jquery-1.8.3.min.js" type="text/javascript"></script> | |
<script src="https://raw.github.com/carlo/jquery-base64/master/jquery.base64.min.js" type="text/javascript"></script> | |
<script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/hmac-sha1.js"></script> | |
<script type="text/javascript"> | |
var secondsInDay = 86400; | |
// Credentials | |
var apiKey = '<apiKey>'; | |
var secret = '<secret>'; | |
var sessionId = '1_MX4xMTMzMTg5Mn4xMjcuMC4wLjF-U3VuIERlYyAwMiAwNjo0NTozMSBQU1QgMjAxMn4wLjQwMjY2OH4'; |
NewerOlder