Fix crashing when checking player size
This commit is contained in:
parent
ec83830e78
commit
43b136ca46
@ -394,7 +394,7 @@ class PlayerData {
|
|||||||
this.getPlayer();
|
this.getPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
checkPlayerSizeChange(){
|
checkPlayerSizeChange() {
|
||||||
// this 'if' is just here for debugging — real code starts later. It's safe to collapse and
|
// this 'if' is just here for debugging — real code starts later. It's safe to collapse and
|
||||||
// ignore the contents of this if (unless we need to change how logging works)
|
// ignore the contents of this if (unless we need to change how logging works)
|
||||||
if (this.logger.canLog('debug')){
|
if (this.logger.canLog('debug')){
|
||||||
|
@ -303,10 +303,8 @@ class Resizer {
|
|||||||
|
|
||||||
this.zoom.applyZoom(stretchFactors);
|
this.zoom.applyZoom(stretchFactors);
|
||||||
|
|
||||||
//TODO: correct these two
|
|
||||||
var translate = this.computeOffsets(stretchFactors);
|
var translate = this.computeOffsets(stretchFactors);
|
||||||
this.applyCss(stretchFactors, translate);
|
this.applyCss(stretchFactors, translate);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -581,8 +579,11 @@ class Resizer {
|
|||||||
`Video seems to be both wider and taller (or shorter and narrower) than player element at the same time. This is super duper not supposed to happen.\n\n`,
|
`Video seems to be both wider and taller (or shorter and narrower) than player element at the same time. This is super duper not supposed to happen.\n\n`,
|
||||||
`Player element needs to be checked.`
|
`Player element needs to be checked.`
|
||||||
)
|
)
|
||||||
this.player.checkPlayerSizeChange();
|
if (this.conf.player.checkPlayerSizeChange()) {
|
||||||
|
this.conf.player.onPlayerDimensionsChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return translate;
|
return translate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user