Created
July 28, 2011 23:44
-
-
Save darkside/1112839 to your computer and use it in GitHub Desktop.
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 fullScreen = false; | |
function getMyApp(appName) | |
{ | |
if(navigator.appName.indexOf ("Microsoft") !=-1) | |
{ | |
return window[appName]; | |
}else{ | |
return document[appName]; | |
} | |
} | |
function toogleScreen() | |
{ | |
if(!fullScreen) | |
{ | |
document.getElementById("p2p").height = 460; | |
fullScreen = true; | |
}else | |
{ | |
document.getElementById("p2p").height = 230; | |
fullScreen = false; | |
} | |
getMyApp("p2p").toogleScreen(); | |
} | |
function showMyHash(hash) | |
{ | |
var answer = confirm ("Você já está conectado ao servidor. Agora copie o hash abaixo e envie para o outro peer.\n\n" + hash + "\n\nAgora aguarde ele te enviar o hash dele"); | |
if(answer) | |
{ | |
initConference(prompt("Cole aqui o hash enviado por ele")); | |
} | |
} | |
function initConference(hashFriend) | |
{ | |
getMyApp("p2p").initStream(hashFriend); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment