From ee9599d0409f372aa37358f65ab269ad3b7f603e Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Sun, 31 Jan 2021 01:04:31 +0100 Subject: [PATCH] bind this for shits and giggles on onPlayerDimensionsChanged --- src/ext/lib/video-data/PlayerData.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ext/lib/video-data/PlayerData.js b/src/ext/lib/video-data/PlayerData.js index 7e4b69d..620eec1 100644 --- a/src/ext/lib/video-data/PlayerData.js +++ b/src/ext/lib/video-data/PlayerData.js @@ -87,6 +87,7 @@ class PlayerData { // player size observer may not be strictly necessary here onPlayerDimensionsChanged(mutationList, observer, context) { + console.log("context:", context, "this:", this); if (context.checkPlayerSizeChange()) { context.videoData.resizer.restore(); } @@ -115,7 +116,7 @@ class PlayerData { try { const ths = this; - this.observer = new MutationObserver((m,o) => this.onPlayerDimensionsChanged(m,o,ths)); + this.observer = new MutationObserver((m,o) => this.onPlayerDimensionsChanged(m,o,this).bind(this)); const observerConf = { attributes: true,