mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
fixed some issues with switching channels and host-mode enabling
This commit is contained in:
@@ -91,11 +91,13 @@ var Player = {
|
||||
setThumbnail: function(conf, video_id) {
|
||||
if(embed) return;
|
||||
if(!conf.hasOwnProperty("thumbnail") || conf.thumbnail == "") {
|
||||
if(videoSource == "soundcloud") {
|
||||
document.getElementById("thumbnail_image").innerHTML = "<img id='thumbnail_image_channel' src='" + full_playlist[full_playlist.length - 1].thumbnail + "' alt='thumbnail' />";
|
||||
} else {
|
||||
document.getElementById("thumbnail_image").innerHTML = "<img id='thumbnail_image_channel' src='https://img.youtube.com/vi/"+video_id+"/mqdefault.jpg' alt='thumbnail' />";
|
||||
}
|
||||
try {
|
||||
if(videoSource == "soundcloud" && full_playlist != undefined) {
|
||||
document.getElementById("thumbnail_image").innerHTML = "<img id='thumbnail_image_channel' src='" + full_playlist[full_playlist.length - 1].thumbnail + "' alt='thumbnail' />";
|
||||
} else {
|
||||
document.getElementById("thumbnail_image").innerHTML = "<img id='thumbnail_image_channel' src='https://img.youtube.com/vi/"+video_id+"/mqdefault.jpg' alt='thumbnail' />";
|
||||
}
|
||||
} catch(e) {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -828,7 +830,7 @@ var Player = {
|
||||
onYouTubeIframeAPIReady: function() {
|
||||
Player.player = new YT.Player('player', {
|
||||
videoId: video_id,
|
||||
playerVars: { rel:"0", wmode:"transparent", controls: "0" , fs: "0", iv_load_policy: "3", theme:"light", color:"white", showinfo: 0},
|
||||
playerVars: { rel:"0", autoplay: 1, wmode:"transparent", controls: "0" , fs: "0", iv_load_policy: "3", theme:"light", color:"white", showinfo: 0},
|
||||
events: {
|
||||
'onReady': Player.onPlayerReady,
|
||||
'onStateChange': Player.onPlayerStateChange,
|
||||
|
||||
Reference in New Issue
Block a user