Skip to content

Instantly share code, notes, and snippets.

@darkside
Created July 28, 2011 23:44
Show Gist options
  • Save darkside/1112839 to your computer and use it in GitHub Desktop.
Save darkside/1112839 to your computer and use it in GitHub Desktop.
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