Fixed scaling issue on mobile when playing, and fixed embed crashes

This commit is contained in:
Kasper Rynning-Tønnesen
2018-07-25 07:20:24 +02:00
parent e8fb72caf2
commit a550138eef
2 changed files with 301 additions and 305 deletions

View File

@@ -148,6 +148,8 @@ window.addEventListener("load", function() {
}
});
function resizePlaylistPlaying(){};
function startWaitTimerPlay() {
setTimeout(function() {
if(videoSource == "youtube") {

View File

@@ -47,7 +47,7 @@ function resizeFunction() {
}
var temp_fit;
if(!Helper.mobilecheck() && !embed && !client){
if(!embed && !client){
temp_fit = Math.round(Helper.computedStyle("#wrapper", "height") / 71);
List.element_height = (Helper.computedStyle("#wrapper", "height") / temp_fit)-5.3;
} else if(embed) {
@@ -876,7 +876,7 @@ function change_offline(enabled, already_offline){
}
function resizePlaylistPlaying(playing) {
if(document.querySelector("#wrapper") == null) return;
if(document.querySelector("#wrapper") == null || embed || client) return;
if(window.innerWidth < 601) {
var subtract = 0;
if(playing) {
@@ -896,15 +896,9 @@ function resizePlaylistPlaying(playing) {
var canFit = List.can_fit;
Helper.css("#wrapper", "height", window.innerHeight - 246 - subtract + "px");
if(!Helper.mobilecheck() && !embed && !client){
if(!embed && !client){
temp_fit = Math.round(Helper.computedStyle("#wrapper", "height") / 71);
List.element_height = (Helper.computedStyle("#wrapper", "height") / temp_fit)-5.3;
} else if(embed) {
temp_fit = Math.round(Helper.computedStyle("#wrapper", "height") / 91) + 1;
List.element_height = (Helper.computedStyle("#wrapper", "height") / temp_fit)-4;
} else if(!client){
temp_fit = Math.round((Helper.computedStyle(".tabs", "height") - Helper.computedStyle("header", "height") - 64 - 40) / 71)+1;
List.element_height = ((window.innerHeight - Helper.computedStyle(".tabs", "height") - Helper.computedStyle("header", "height") - 64 - 40) / temp_fit)-5;
} else {
temp_fit = Math.round(Helper.computedStyle("#wrapper", "height") / 71)+1;
List.element_height = (Helper.computedStyle("#wrapper", "height") / temp_fit)-5.3;