Now sending next video to chromecast

This commit is contained in:
Kasper Rynning-Tønnesen
2016-11-18 15:26:58 +01:00
parent 37ee42fab5
commit 673f9a7a0e
6 changed files with 59 additions and 6 deletions

View File

@@ -36,10 +36,39 @@
.hide{
display: none;
}
#next_song{
display:none;
position: absolute;
background: rgba(255,255,255,0.2);
right: 10px;
bottom: 10px;
border: 1px solid white;
width: 15rem;
height: 7rem;
}
#next_pic{
height: 7rem;
width: 7rem;
}
#next_title{
position: absolute;
top: 45%;
right: 0px;
width: 8rem;
overflow: hidden;
color: white;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="next_song">
<img id="next_pic" src="://" alt="kuk">
<div id="next_title">Coolest song</div>
</div>
<img id="zoff-logo" class="center" src="squareicon_small.png" alt="logo">
<div id="player" class="hide"></div>
</div>

View File

@@ -30,6 +30,10 @@ customMessageBus.onMessage = function(event) {
break;
case "nextVideo":
nextVideo = event.data.videoId;
nextTitle = event.data.title;
$("#next_title").html(nextTitle);
$("#next_pic").attr("src", "//img.youtube.com/vi/"+nextVideo+"/mqdefault.jpg");
$("#next_song").css("display", "block");
break;
}
}