mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-10 00:00:53 +00:00
Maintenance: Another couple small fixes for building a standalone extension.
This commit is contained in:
parent
459e77a2a3
commit
8e19604534
2 changed files with 15 additions and 7 deletions
|
@ -161,9 +161,16 @@ export default class AddonManager extends Module {
|
||||||
: null
|
: null
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ( Array.isArray(cdn_data) )
|
if ( Array.isArray(cdn_data) ) {
|
||||||
for(const addon of cdn_data )
|
// We need to handle relative URLs for addon logos.
|
||||||
|
const base_path = `${SERVER_OR_EXT}/addons/`;
|
||||||
|
|
||||||
|
for(const addon of cdn_data ) {
|
||||||
|
if ( addon.icon )
|
||||||
|
addon.icon = (new URL(addon.icon, base_path)).toString();
|
||||||
this.addAddon(addon, false);
|
this.addAddon(addon, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( Array.isArray(local_data) ) {
|
if ( Array.isArray(local_data) ) {
|
||||||
this.has_dev = true;
|
this.has_dev = true;
|
||||||
|
|
|
@ -362,10 +362,12 @@ export default class Metadata extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the video element.
|
// Get the video element.
|
||||||
|
if ( stats ) {
|
||||||
const video = player && maybe_call(player.getHTMLVideoElement, player);
|
const video = player && maybe_call(player.getHTMLVideoElement, player);
|
||||||
stats.avOffset = 0;
|
stats.avOffset = 0;
|
||||||
if ( video?._ffz_context )
|
if ( video?._ffz_context )
|
||||||
stats.avOffset = (video._ffz_context_offset ?? 0) + video._ffz_context.currentTime - video.currentTime;
|
stats.avOffset = (video._ffz_context_offset ?? 0) + video._ffz_context.currentTime - video.currentTime;
|
||||||
|
}
|
||||||
|
|
||||||
let tampered = false;
|
let tampered = false;
|
||||||
try {
|
try {
|
||||||
|
@ -376,7 +378,6 @@ export default class Metadata extends Module {
|
||||||
}
|
}
|
||||||
} catch(err) { /* no op */ }
|
} catch(err) { /* no op */ }
|
||||||
|
|
||||||
|
|
||||||
if ( ! stats || stats.hlsLatencyBroadcaster < -100 )
|
if ( ! stats || stats.hlsLatencyBroadcaster < -100 )
|
||||||
return {stats};
|
return {stats};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue