1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-12 17:10:54 +00:00
The Embedded Player Update! Adds support for the Compressor, Reset Button, and metadata to the embedded / pop-out player using a minimal build of FFZ.

* Added: Support for the embedded player.
* Fixed: Update the regex for clip URLs to match new extended slugs.
* Fixed: Bugs in `experiments` and `raven` when the `site` module cannot be loaded or does not provide `getCore()`.
* Fixed: Bug in the main menu where the menu may sometimes become unresponsive when opening to a page with no settings.
* Fixed: Attempting to initialize the Compressor when a user has not yet interacted with a page may result in a broken audio stack.
* Fixed: Setting Profile filters that are unknown would always match, rather than always failing. This is problematic if an add-on that provides a filter type has not yet loaded.
This commit is contained in:
SirStendec 2021-02-12 15:27:12 -05:00
parent 264c375f13
commit a473c6eb93
23 changed files with 2362 additions and 49 deletions

View file

@ -261,7 +261,7 @@ export default class ExperimentManager extends Module {
// Twitch Experiments
getTwitchType(type) {
const core = this.resolve('site')?.getCore();
const core = this.resolve('site')?.getCore?.();
if ( core?.experiments?.getExperimentType )
return core.experiments.getExperimentType(type);
@ -275,7 +275,7 @@ export default class ExperimentManager extends Module {
}
getTwitchTypeByKey(key) {
const core = this.resolve('site')?.getCore(),
const core = this.resolve('site')?.getCore?.(),
exps = core && core.experiments,
exp = exps?.experiments?.[key];
@ -289,13 +289,13 @@ export default class ExperimentManager extends Module {
if ( window.__twilightSettings )
return window.__twilightSettings.experiments;
const core = this.resolve('site')?.getCore();
const core = this.resolve('site')?.getCore?.();
return core && core.experiments.experiments;
}
usingTwitchExperiment(key) {
const core = this.resolve('site')?.getCore();
const core = this.resolve('site')?.getCore?.();
return core && has(core.experiments.assignments, key)
}
@ -305,7 +305,7 @@ export default class ExperimentManager extends Module {
overrides[key] = value;
Cookie.set(OVERRIDE_COOKIE, overrides, COOKIE_OPTIONS);
const core = this.resolve('site')?.getCore();
const core = this.resolve('site')?.getCore?.();
if ( core )
core.experiments.overrides[key] = value;
@ -321,7 +321,7 @@ export default class ExperimentManager extends Module {
delete overrides[key];
Cookie.set(OVERRIDE_COOKIE, overrides, COOKIE_OPTIONS);
const core = this.resolve('site')?.getCore();
const core = this.resolve('site')?.getCore?.();
if ( core )
delete core.experiments.overrides[key];
@ -334,7 +334,7 @@ export default class ExperimentManager extends Module {
}
getTwitchAssignment(key, channel = null) {
const core = this.resolve('site')?.getCore(),
const core = this.resolve('site')?.getCore?.(),
exps = core && core.experiments;
if ( ! exps )
@ -378,7 +378,7 @@ export default class ExperimentManager extends Module {
}
_rebuildTwitchKey(key, is_set, new_val) {
const core = this.resolve('site')?.getCore(),
const core = this.resolve('site')?.getCore?.(),
exps = core.experiments,
old_val = has(exps.assignments, key) ?