Fixed issue with playlist seeking with no list, seeking at statechangen for youtube and resizing on frontpage crash

This commit is contained in:
Kasper Rynning-Tønnesen
2018-07-25 23:21:38 +02:00
parent 1e6e507362
commit f021808d8b
3 changed files with 4 additions and 3 deletions

View File

@@ -363,6 +363,7 @@ var Channel = {
var acceptable = ["bar", "controls", "duration"];
if(acceptable.indexOf(e.target.getAttribute("id")) >= 0) {
if(full_playlist == undefined) return;
var total = full_playlist[full_playlist.length - 1].duration / document.getElementById("controls").offsetWidth;
total = total * e.clientX;

View File

@@ -23,8 +23,8 @@ function removeAllListeners() {
function resizeFunction() {
if(chan && !Helper.mobilecheck()){
if(document.querySelector("#wrapper") == null) return;
if(!client && !embed) document.querySelector("#hide-playlist").style.left = (document.querySelector("#video-container").offsetWidth - document.querySelector("#hide-playlist").offsetWidth) + "px";
if(document.querySelector("#wrapper") == null) return;
if(window.innerWidth > 600 && document.querySelector("#wrapper").style.height != "") {
document.querySelector("#wrapper").style.height = "";
document.querySelector("#chat-bar").style.height = "";

View File

@@ -109,8 +109,8 @@ var Player = {
newState.data
]);
if(Player.player && Player.player.getCurrentTime() > startTime + Player.np.start && !fix_too_far && autoplay) {
Player.seekTo(seekTo);
Player.playVideo();
//Player.seekTo(seekTo);
//Player.playVideo();
fix_too_far = true;
}
try {