Compare commits
2 Commits
8658b3c0d3
...
39f39f23a7
Author | SHA1 | Date | |
---|---|---|---|
39f39f23a7 | |||
ff0de6f2e7 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ultrawidify",
|
"name": "ultrawidify",
|
||||||
"version": "6.2.4",
|
"version": "6.2.5",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ultrawidify",
|
"name": "ultrawidify",
|
||||||
"version": "6.2.4",
|
"version": "6.2.5",
|
||||||
"description": "Aspect ratio fixer for youtube and other sites, with automatic aspect ratio detection. Supports ultrawide and other ratios.",
|
"description": "Aspect ratio fixer for youtube and other sites, with automatic aspect ratio detection. Supports ultrawide and other ratios.",
|
||||||
"author": "Tamius Han <tamius.han@gmail.com>",
|
"author": "Tamius Han <tamius.han@gmail.com>",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -103,6 +103,8 @@ class PlayerData {
|
|||||||
|
|
||||||
private ui: UI;
|
private ui: UI;
|
||||||
|
|
||||||
|
private _isTrackDimensionChangesActive: boolean = false;
|
||||||
|
|
||||||
elementStack: ElementStack = [] as ElementStack;
|
elementStack: ElementStack = [] as ElementStack;
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
@ -371,6 +373,15 @@ class PlayerData {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
trackDimensionChanges() {
|
trackDimensionChanges() {
|
||||||
|
if (this._isTrackDimensionChangesActive) {
|
||||||
|
// this shouldn't really get called, _ever_ ... but sometimes it happens
|
||||||
|
console.warn('[PlayerData::trackDimensionChanges] trackDimensionChanges is already active!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._isTrackDimensionChangesActive = true;
|
||||||
|
|
||||||
|
try {
|
||||||
// get player dimensions _once_
|
// get player dimensions _once_
|
||||||
let currentPlayerDimensions;
|
let currentPlayerDimensions;
|
||||||
this.isFullscreen = !!document.fullscreenElement;
|
this.isFullscreen = !!document.fullscreenElement;
|
||||||
@ -404,6 +415,7 @@ class PlayerData {
|
|||||||
this.eventBus.send('restore-ar', null);
|
this.eventBus.send('restore-ar', null);
|
||||||
this.eventBus.send('delayed-restore-ar', {delay: 500});
|
this.eventBus.send('delayed-restore-ar', {delay: 500});
|
||||||
this.dimensions = currentPlayerDimensions;
|
this.dimensions = currentPlayerDimensions;
|
||||||
|
this._isTrackDimensionChangesActive = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -414,6 +426,11 @@ class PlayerData {
|
|||||||
|
|
||||||
// Save current dimensions to avoid triggering this function pointlessly
|
// Save current dimensions to avoid triggering this function pointlessly
|
||||||
this.dimensions = currentPlayerDimensions;
|
this.dimensions = currentPlayerDimensions;
|
||||||
|
} catch (e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this._isTrackDimensionChangesActive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Ultrawidify",
|
"name": "Ultrawidify",
|
||||||
"description": "Removes black bars on ultrawide videos and offers advanced options to fix aspect ratio.",
|
"description": "Removes black bars on ultrawide videos and offers advanced options to fix aspect ratio.",
|
||||||
"version": "6.2.4",
|
"version": "6.2.5",
|
||||||
"icons": {
|
"icons": {
|
||||||
"32":"res/icons/uw-32.png",
|
"32":"res/icons/uw-32.png",
|
||||||
"64":"res/icons/uw-64.png"
|
"64":"res/icons/uw-64.png"
|
||||||
|
Loading…
Reference in New Issue
Block a user