console.log("Email: " + profile.getEmail()); document.getElementById("getstarted").style.visibility = "visible"; document.getElementById("getstartedB").disabled = ""; } </script> <script> function signOut() { var auth2 = gapi.auth2.getAuthInstance(); auth2.signOut().then(function () { console.log("User signed out."); document.getElementById("getstarted").style.visibility = "hidden"; document.getElementById("getstartedB").disabled = "disbled"; document.getElementById("options").style.visibility = "hidden"; }); } </script> '; $mainPanel = "\n \n <div id='main'>\n <div id='welcome'>\n <h1>Welcome to RealTC, <br />\n a browser plugin which will allow for you and all your friends to collaborate in one single workspace!</h1>\n </div>\n \n <div id='getstarted' style='visibility:hidden'>\n <h3>To get started, click on the button below!</h3>\n <button type='button' id='getstartedB' onclick='document.getElementById(\"options\").style.visibility = \"visible\"' disabled='disabled'>Get Started</button>\n <div id='options' style='visibility:hidden'>\n <table style='width: 100%'>\n <tr style='width: 100%'>\n <th class='col-xs-4 col-md-4 col-lg-4' style='text-align: center;width: 33%'>\n <p>Collab with Paint!<br />\n <a href='/realtc/paintEditor/index.php'><button type='button' id='paintCollab'>Paint!</button></a></p>\n </th>\n <th> \n <p>Listen to Music Together<br />\n <a href='/realtc/musicStreaming/index.php'><button type='button' id='musicCollab'>Share Music!</button></a>\n </th>\n <th>\n <p>Watch Videos Together!<br />\n <a href='/realtc/videoStreaming/index.php'><button type='button' id='videoCollab'>Share Media!</button></a></p>\n </th>\n </tr>\n </table>\n </div>\n </div>\n \n <table id='line2'>\n <tr>\n <th width='250px'>\n <div id='about'>\n <h3>About (Us, The Application and Our Dream)</h3>\n <a href='about.html'><button id='about' type='button'>About</button></a>\n </div>\n </th>\n <th width='250px'>\n <div id='funding'>\n <h4>To donate any money for whatsoever reason, <br/>click on the button below!</h4>\n <p>And thanks :)</p>\n <a href='/realtc/signin/donate.php'><button type='button' onclick='donate.html' >Donate Us</button></a>\n </div>\n </th>\n </tr>\n </table>\n </div>\n"; $bodyPanel = "\n <div id='side'>\n <div id='loginup'>\n <div class='g-signin2' data-onsuccess='onSignIn'></div>\n <a href='#' onclick='signOut();'><img src='/realtc/images/g-signout.jpg' width='150' height='25' alt='Sign out'></a>\n </div>\n " . $googleSignIn . "\n </div>\n"; headTemplate("Login", "Login", "./landing.css", "./loginjs.php"); bodyTemplate($mainPanel, $bodyPanel); ?> <form action="" method="post" style="width: 100%;text-align: center"> </form>
TogetherJS.hub.on('pause', function() { var player = document.getElementById('player'); if (!player.paused) { player.pause(); } return false; }); //changes on seek TogetherJS.hub.on('seek', function(msg) { var player = document.getElementById('player'); if (player.paused) { player.currentTime = msg.currentTime; playMusic(); } return false; }); </script> <?php $main = ' <br/> <br/> <audio id="player" controls="controls" onplay="playMusic();" onpause="pauseMusic();" onseeked="seekingMusic();"> <source id="musicid" src="falcon.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio>'; require_once '../bodyTemplate.php'; bodyTemplate($main, ""); ?> </body>