mirror of
https://github.com/KevinMidboe/zoff.git
synced 2026-01-08 10:35:34 +00:00
Merge pull request #426 from zoff-music/fix/embedded-next
Fix/embedded next
This commit is contained in:
@@ -19,7 +19,7 @@ var sc_initialized = false;
|
||||
var startTime = 0;
|
||||
var small = false;
|
||||
var small_player = false;
|
||||
var full_playlist;
|
||||
var full_playlist = [];
|
||||
var hostMode = false;
|
||||
var soundcloud_enabled = true;
|
||||
var socket_connected = false;
|
||||
@@ -83,8 +83,12 @@ function receiveMessage(event) {
|
||||
} else if(event.data == "get_info") {
|
||||
window.parentWindow.postMessage({type: "np", title: song_title}, window.parentOrigin);
|
||||
window.parentWindow.postMessage({type: "controller", id: Hostcontroller.old_id}, window.parentOrigin);
|
||||
if(full_playlist.length > 0) {
|
||||
Player.sendNext({title: full_playlist[0].title, videoId: full_playlist[0].id});
|
||||
try {
|
||||
if(full_playlist.length > 0) {
|
||||
Player.sendNext({title: full_playlist[0].title, videoId: full_playlist[0].id});
|
||||
}
|
||||
} catch(e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,11 @@ var Player = {
|
||||
song_title = obj.np[0].title;
|
||||
duration = obj.np[0].duration;
|
||||
|
||||
if(offline && (video_id == "" || video_id == undefined || local_new_channel) && !client){
|
||||
if(embed) {
|
||||
try {
|
||||
window.parentWindow.postMessage({type: "np", title: song_title}, window.parentOrigin);
|
||||
} catch(e) {}
|
||||
} else if(offline && (video_id == "" || video_id == undefined || local_new_channel) && !client){
|
||||
if(obj.conf != undefined) {
|
||||
conf = obj.conf[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user