mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Stringifyyy
This commit is contained in:
@@ -40,7 +40,7 @@ customMessageBus.onMessage = function(event) {
|
||||
case "nextVideo":
|
||||
nextVideo = json_parsed.videoId;
|
||||
nextTitle = json_parsed.title;
|
||||
$("#next_title").html(nextTitle);
|
||||
$("#next_title").html("Next Song:<br>" + nextTitle);
|
||||
$("#next_pic").attr("src", "//img.youtube.com/vi/"+nextVideo+"/mqdefault.jpg");
|
||||
$("#next_song").css("display", "flex");
|
||||
break;
|
||||
@@ -136,7 +136,7 @@ function onPlayerStateChange(event) {
|
||||
//channel.send({'event':'stateChange','message':event.data});
|
||||
console.log(event);
|
||||
if (event.data==YT.PlayerState.ENDED) {
|
||||
customMessageBus.broadcast("{type: -1, videoId: '" + videoId + "'}")
|
||||
customMessageBus.broadcast(JSON.stringify({type: -1, videoId: " + videoId + "}));
|
||||
//customMessageBus.send("urn:x-cast:zoff.no", {type: -1, videoId: videoId})
|
||||
}
|
||||
}
|
||||
|
||||
2
static/dist/main.min.js
vendored
2
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -303,7 +303,7 @@ function chromecastListener(evt, data){
|
||||
console.log(data);
|
||||
var json_parsed = JSON.parse(data);
|
||||
switch(json_parsed){
|
||||
case -1:
|
||||
case "-1":
|
||||
socket.emit("end", {id: json_parsed.videoId, channel: chan.toLowerCase()});
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user