From 93d3b064da75cb6bfc189e3e16b281519fc84fc8 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Wed, 7 Mar 2018 23:49:43 +0100 Subject: [PATCH] end of the day commit. multiple concurrent instances seems to be at least somewhat under control, but other parts of extension still need modifications and testing. --- js/conf/Settings.js | 2 +- js/lib/PlayerDetect.js | 10 +++++----- js/modules/Resizer.js | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/js/conf/Settings.js b/js/conf/Settings.js index b1ec48c..43be3ea 100644 --- a/js/conf/Settings.js +++ b/js/conf/Settings.js @@ -75,7 +75,7 @@ var Settings = { allowedMisaligned: 0.05, // top and bottom letterbox thickness can differ by this much. // Any more and we don't adjust ar. allowedArVariance: 0.075, // amount by which old ar can differ from the new (1 = 100%) - timer_playing: 100, // we trigger ar this often (in ms) under this conditions + timer_playing: 30, // we trigger ar this often (in ms) under this conditions timer_paused: 3000, timer_error: 3000, timer_minimumTimeout: 5, // but regardless of above, we wait this many msec before retriggering diff --git a/js/lib/PlayerDetect.js b/js/lib/PlayerDetect.js index 99034db..df1596c 100644 --- a/js/lib/PlayerDetect.js +++ b/js/lib/PlayerDetect.js @@ -35,26 +35,26 @@ var _pd_isFullScreen = function(){ var _pd_getPlayerDimensions = function(element){ - if(element == null){ + if(element == null || element == undefined){ if(Debug.debug) console.log("[PlayerDetect::_pd_getPlayerDimensions] element is not valid, doing nothing.", element) return; } - try{ + var trustCandidateAfterGrows = 2; // if candidate_width or candidate_height increases in either dimensions this many // times, we say we found our player. (This number ignores weird elements) // in case our