mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-03 00:18:31 +00:00
4.20.14
* Fixed: Disabling auto-play of channels on the front page not working. (Closes #848) * Fixed: Automatic theater mode not working correctly when navigating between pages on Twitch. (Closes #846)
This commit is contained in:
parent
75d57c3402
commit
65a00df2a9
3 changed files with 19 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "frankerfacez",
|
"name": "frankerfacez",
|
||||||
"author": "Dan Salvato LLC",
|
"author": "Dan Salvato LLC",
|
||||||
"version": "4.20.13",
|
"version": "4.20.14",
|
||||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -336,7 +336,7 @@ export default class Directory extends SiteModule {
|
||||||
|
|
||||||
const should_hide = (props.streamType === 'rerun' && this.settings.get('directory.hide-vodcasts')) ||
|
const should_hide = (props.streamType === 'rerun' && this.settings.get('directory.hide-vodcasts')) ||
|
||||||
(props.context != null && props.context !== CARD_CONTEXTS.SingleGameList && this.settings.provider.get('directory.game.blocked-games', []).includes(game)) ||
|
(props.context != null && props.context !== CARD_CONTEXTS.SingleGameList && this.settings.provider.get('directory.game.blocked-games', []).includes(game)) ||
|
||||||
(props.sourceType === 'PROMOTION' && this.settings.get('directory.hide-promoted'));
|
((props.sourceType === 'PROMOTION' || props.sourceType === 'SPONSORED') && this.settings.get('directory.hide-promoted'));
|
||||||
|
|
||||||
let hide_container = el.closest('.tw-tower > div');
|
let hide_container = el.closest('.tw-tower > div');
|
||||||
if ( ! hide_container )
|
if ( ! hide_container )
|
||||||
|
|
|
@ -649,7 +649,7 @@ export default class Player extends Module {
|
||||||
|
|
||||||
cls.prototype.ffzStopAutoplay = function() {
|
cls.prototype.ffzStopAutoplay = function() {
|
||||||
if ( t.settings.get('player.no-autoplay') || (! t.settings.get('player.home.autoplay') && t.router.current.name === 'front-page') )
|
if ( t.settings.get('player.no-autoplay') || (! t.settings.get('player.home.autoplay') && t.router.current.name === 'front-page') )
|
||||||
this.stopPlayer(this.props.mediaPlayerInstance, this.props.playerEvents, this);
|
t.stopPlayer(this.props.mediaPlayerInstance, this.props.playerEvents, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
cls.prototype.ffzScheduleState = function() {
|
cls.prototype.ffzScheduleState = function() {
|
||||||
|
@ -806,11 +806,17 @@ export default class Player extends Module {
|
||||||
inst.ffzUninstall();
|
inst.ffzUninstall();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.TheatreHost.on('mount', inst => {
|
||||||
this.TheatreHost.on('mount', this.tryTheatreMode, this);
|
inst._ffz_theater_start = Date.now();
|
||||||
|
this.tryTheatreMode(inst);
|
||||||
|
});
|
||||||
|
this.TheatreHost.on('update', this.tryTheatreMode, this);
|
||||||
this.TheatreHost.ready((cls, instances) => {
|
this.TheatreHost.ready((cls, instances) => {
|
||||||
for(const inst of instances)
|
const now = Date.now();
|
||||||
|
for(const inst of instances) {
|
||||||
|
inst._ffz_theater_start = now;
|
||||||
this.tryTheatreMode(inst);
|
this.tryTheatreMode(inst);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.PlayerSource.on('mount', this.checkCarousel, this);
|
this.PlayerSource.on('mount', this.checkCarousel, this);
|
||||||
|
@ -1505,18 +1511,21 @@ export default class Player extends Module {
|
||||||
|
|
||||||
tryTheatreMode(inst) {
|
tryTheatreMode(inst) {
|
||||||
if ( ! inst._ffz_theater_timer )
|
if ( ! inst._ffz_theater_timer )
|
||||||
inst._ffz_theater_timer = setTimeout(() => {
|
inst._ffz_theater_timer = requestAnimationFrame(() => {
|
||||||
inst._ffz_theater_timer = null;
|
inst._ffz_theater_timer = null;
|
||||||
|
|
||||||
if ( ! this.settings.get('player.theatre.auto-enter') || ! inst._ffz_mounted )
|
if ( ! this.settings.get('player.theatre.auto-enter') || ! inst._ffz_mounted )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( inst.props.channelHomeLive || inst.props.channelHomeCarousel )
|
if ( inst.props.channelHomeLive || inst.props.channelHomeCarousel || inst.props.theatreModeEnabled )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( inst?.props?.onTheatreModeEnabled )
|
if ( Date.now() - (inst._ffz_theater_start ||0) > 2000 )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( inst.props.onTheatreModeEnabled )
|
||||||
inst.props.onTheatreModeEnabled();
|
inst.props.onTheatreModeEnabled();
|
||||||
}, 250);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue