bind this for shits and giggles on onPlayerDimensionsChanged

This commit is contained in:
Tamius Han 2021-01-31 01:04:31 +01:00
parent 851f0e0e84
commit ee9599d040

View File

@ -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,