Commit f1e92b97 authored by Steve Johnson's avatar Steve Johnson

fixed Chromecast code to reflect new folder layout

parent 52c99a43
......@@ -50,6 +50,7 @@ limitations under the License.
top: 0;
left: 0;
background-color: black;
color: red;
font-size:20px;
}
#containerFrame
......@@ -63,6 +64,16 @@ limitations under the License.
overflow: hidden;
border: none;
}
#debug
{
position: absolute;
background-color: white;
left: 0;
top: 0;
z-index: 100;
color: blue;
min-width: 100%;
}
</style>
<title>Cast MSE</title>
......@@ -70,6 +81,7 @@ limitations under the License.
<body>
<div id="container">MSE Container</div>
<div id="splash"></div>
<div id="debug"><div/>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js"></script>
<script type="text/javascript">
......@@ -115,20 +127,8 @@ limitations under the License.
if (msgObject.command === 'launch') {
//displayText("launching url: "+msgObject.url);
/* Too choppy
var opacity = 1;
var timer = setInterval(function(){
opacity -= .050;
if (opacity <= 0) {
opacity = 0;
clearInterval(timer);
}
}, 30);
$("#splash").css({ opacity: opacity });
*/
console.log("Received launch command: "+msgObject.url);
$('#container').html("<iframe id='containerFrame' src='"+msgObject.url+"'></iframe>");
dbglog("Received launch command: "+msgObject.url);
$('#containerFrame').load(function(){
$("#splash").css({ opacity: 0 });
......@@ -136,21 +136,21 @@ limitations under the License.
}
else if (msgObject.command === 'close') {
console.log("Received close command.");
dbglog("Received close command.");
window.close();
}
else {
console.log("Unknown command: "+event.data);
dbglog("Unknown command: "+event.data);
}
return;
}
catch(e) {
console.log("failed to process message: "+e);
console.log("message: \n"+event.data);
dbglog("failed to process message: "+e);
dbglog("message: \n"+event.data);
}
console.log('Message [' + event.senderId + ']: ' + event.data);
dbglog('Message [' + event.senderId + ']: ' + event.data);
// display the message from the sender
displayText(event.data);
// inform all senders on the CastMessageBus of the incoming message event
......@@ -160,7 +160,7 @@ limitations under the License.
// initialize the CastReceiverManager with an application status message
window.castReceiverManager.start({statusText: "Application is starting"});
console.log('Receiver Manager started');
dbglog('Receiver Manager started');
};
// utility function to display the text message in the input field
......@@ -169,6 +169,12 @@ limitations under the License.
document.getElementById("splash").innerHTML=text;
window.castReceiverManager.setApplicationState(text);
};
function dbglog(text) {
console.log(text);
//$('#debug').append('<p>'+text+'<p/>');
}
</script>
</body>
</html>
\ No newline at end of file
......@@ -8,13 +8,12 @@
<title>MSE TV</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="../js/utility.js" ></script>
<script type="text/javascript" src="../js/constants.js" ></script>
<script type="text/javascript" src="../js/applicationBridge.js" ></script>
<script type="text/javascript" src="../js/NodeServerConnection.js" ></script>
<script type="text/javascript" src="../js/NodeServerDirectory.js" ></script>
<script type="text/javascript" src="../ext/js/jquery.cookie.js" ></script>
script>
<script type="text/javascript" src="../../../sdom/js/utility.js" ></script>
<script type="text/javascript" src="../../../sdom/js/constants.js" ></script>
<script type="text/javascript" src="../../../sdom/js/applicationBridge.js" ></script>
<script type="text/javascript" src="../../../sdom/js/wsBridgeConnection.js" ></script>
<script type="text/javascript" src="../../../sdom/js/wsBridgeDirectory.js" ></script>
<script type="text/javascript" src="../../../sdom/ext/js/jquery.cookie.js" ></script>
<script type="text/javascript" src="../shared/sc.js" ></script>
<style type="text/css">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment