Thumbnail not crashing embedded player

This commit is contained in:
Kasper Rynning-Tønnesen
2018-05-01 14:14:42 +02:00
parent 96e0c31bf9
commit 3d3d6eb29b

View File

@@ -249,6 +249,7 @@ var Player = {
}, },
setThumbnail: function(conf, video_id) { setThumbnail: function(conf, video_id) {
if(embed) return;
if(!conf.hasOwnProperty("thumbnail") || conf.thumbnail == "") { if(!conf.hasOwnProperty("thumbnail") || conf.thumbnail == "") {
document.getElementById("thumbnail_image").innerHTML = "<img id='thumbnail_image_channel' src='https://img.youtube.com/vi/"+video_id+"/mqdefault.jpg' alt='thumbnail' />"; document.getElementById("thumbnail_image").innerHTML = "<img id='thumbnail_image_channel' src='https://img.youtube.com/vi/"+video_id+"/mqdefault.jpg' alt='thumbnail' />";
} }