Compare commits
No commits in common. "4abf817f2ad46d7517c6a744ef7958146fe1a12b" and "c68045cd0e25af5d44768e1ae13652a954f8bdaa" have entirely different histories.
4abf817f2a
...
c68045cd0e
4 changed files with 5 additions and 20 deletions
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
import JadefinIntegrity from "./JadefinIntegrity.js";
|
import JadefinIntegrity from "./JadefinIntegrity.js";
|
||||||
|
|
||||||
import JadefinUtils from "./JadefinUtils.js";
|
|
||||||
|
|
||||||
import cyrb53a from "./utils/cyrb53.js";
|
import cyrb53a from "./utils/cyrb53.js";
|
||||||
|
|
||||||
export default JadefinIntegrity("JadefinLog", import.meta.url, () => class JadefinLog {
|
export default JadefinIntegrity("JadefinLog", import.meta.url, () => class JadefinLog {
|
||||||
|
@ -66,7 +64,7 @@ export default JadefinIntegrity("JadefinLog", import.meta.url, () => class Jadef
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.length == 1 && !JadefinUtils.isFF) {
|
if (args.length == 1) {
|
||||||
if (args[0] instanceof Error) {
|
if (args[0] instanceof Error) {
|
||||||
console.error(args[0]);
|
console.error(args[0]);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -16,8 +16,6 @@ export default JadefinIntegrity("JadefinUtils", import.meta.url, () => window["J
|
||||||
/** @type {any} */
|
/** @type {any} */
|
||||||
htmlVideoPlayer = null;
|
htmlVideoPlayer = null;
|
||||||
|
|
||||||
isFF = globalThis.navigator?.userAgent.toLowerCase().includes("firefox") || false;
|
|
||||||
|
|
||||||
get isInMovie() {
|
get isInMovie() {
|
||||||
return !!document.querySelector(".osdHeader");
|
return !!document.querySelector(".osdHeader");
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ export default JadefinIntegrity("InputEater", import.meta.url, () => new (class
|
||||||
item.secondaryText = "Give up control over the party";
|
item.secondaryText = "Give up control over the party";
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.canBeEating && current == ExtrasMenu.IN_MOVIE;
|
return this.canBeEating;
|
||||||
},
|
},
|
||||||
cb: () => {
|
cb: () => {
|
||||||
this.isEnabled = !this.isEnabled;
|
this.isEnabled = !this.isEnabled;
|
||||||
|
|
|
@ -9,8 +9,6 @@ import JadefinUtils from "../../JadefinUtils.js";
|
||||||
|
|
||||||
// Thanks, Mozilla, for killing Firefox... https://bugzilla.mozilla.org/show_bug.cgi?id=1331110
|
// Thanks, Mozilla, for killing Firefox... https://bugzilla.mozilla.org/show_bug.cgi?id=1331110
|
||||||
export default JadefinIntegrity("PatchFirefoxAnamorphic", import.meta.url, () => new (class PatchFirefoxAnamorphic extends JadefinMod {
|
export default JadefinIntegrity("PatchFirefoxAnamorphic", import.meta.url, () => new (class PatchFirefoxAnamorphic extends JadefinMod {
|
||||||
wantedWidth = 0;
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -53,22 +51,15 @@ export default JadefinIntegrity("PatchFirefoxAnamorphic", import.meta.url, () =>
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.video == video) {
|
if (this.video == video) {
|
||||||
return this._dispatch(this.wantedWidth);
|
return this._dispatch(0);
|
||||||
}
|
|
||||||
|
|
||||||
const streams = JadefinUtils.currentPlayer?.streamInfo?.mediaSource?.MediaStreams;
|
|
||||||
if (!streams) {
|
|
||||||
this.log.i("Waiting for media streams");
|
|
||||||
setTimeout(() => this.update(), 100);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.video = video;
|
this.video = video;
|
||||||
|
|
||||||
const ratioStr = streams.find(s => s.Type == "Video").AspectRatio;
|
const ratioStr = JadefinUtils.currentPlayer.streamInfo.mediaSource.MediaStreams.find(s => s.Type == "Video").AspectRatio;
|
||||||
const ratioStrSplit = ratioStr && ratioStr.split(":");
|
const ratioStrSplit = ratioStr && ratioStr.split(":");
|
||||||
if (!ratioStrSplit || !ratioStrSplit[1]) {
|
if (!ratioStrSplit || !ratioStrSplit[1]) {
|
||||||
this.log.i("Aspect ratio couldn't be determined");
|
this.log.i(`Aspect ratio couldn't be determined`);
|
||||||
return this._dispatch(0);
|
return this._dispatch(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,8 +81,6 @@ export default JadefinIntegrity("PatchFirefoxAnamorphic", import.meta.url, () =>
|
||||||
* @param {number} width
|
* @param {number} width
|
||||||
*/
|
*/
|
||||||
_dispatch(width) {
|
_dispatch(width) {
|
||||||
this.wantedWidth = width;
|
|
||||||
|
|
||||||
JadefinUtils.events.dispatchEvent(new CustomEvent("PatchFirefoxAnamorphic", {
|
JadefinUtils.events.dispatchEvent(new CustomEvent("PatchFirefoxAnamorphic", {
|
||||||
detail: {
|
detail: {
|
||||||
width
|
width
|
||||||
|
|
Loading…
Add table
Reference in a new issue