From 4001d15b188364dbd68c7e4e87930e6ff154a5ba Mon Sep 17 00:00:00 2001 From: SirStendec Date: Sun, 11 Dec 2022 15:48:32 -0500 Subject: [PATCH] 4.38.2 * Fixed: The Audio Compressor incorrectly being disabled due to changes in Twitch's player causing FFZ to incorrectly assume a clip is being played. * Fixed: Twitch emote cards failing to open when clicking an emote. (Hilariously, this is because we were searching for the component that opens emote cards up to 200 entries up the stack. It is now, as of the time of this update, 201 entries up the stack.) * API Fixed: When adding a new chat action definition or renderer, invalidate message hover, user context, and room actions as well and not only inline. --- package.json | 2 +- src/modules/chat/actions/index.jsx | 13 +++++++++++-- src/modules/chat/emotes.js | 2 +- src/sites/shared/player.jsx | 4 +++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b9d4512c..c0e3b381 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.38.1", + "version": "4.38.2", "description": "FrankerFaceZ is a Twitch enhancement suite.", "private": true, "license": "Apache-2.0", diff --git a/src/modules/chat/actions/index.jsx b/src/modules/chat/actions/index.jsx index b8ac95e1..acc946bb 100644 --- a/src/modules/chat/actions/index.jsx +++ b/src/modules/chat/actions/index.jsx @@ -258,8 +258,12 @@ export default class Actions extends Module { this.actions[key] = data; - for(const ctx of this.settings.__contexts) + for(const ctx of this.settings.__contexts) { ctx.update('chat.actions.inline'); + ctx.update('chat.actions.hover'); + ctx.update('chat.actions.user-context'); + ctx.update('chat.actions.room'); + } } @@ -269,8 +273,13 @@ export default class Actions extends Module { this.renderers[key] = data; - for(const ctx of this.settings.__contexts) + for(const ctx of this.settings.__contexts) { ctx.update('chat.actions.inline'); + ctx.update('chat.actions.inline'); + ctx.update('chat.actions.hover'); + ctx.update('chat.actions.user-context'); + ctx.update('chat.actions.room'); + } } diff --git a/src/modules/chat/emotes.js b/src/modules/chat/emotes.js index 2f8450b8..ebc0a231 100644 --- a/src/modules/chat/emotes.js +++ b/src/modules/chat/emotes.js @@ -513,7 +513,7 @@ export default class Emotes extends Module { return; const line = fine.searchParent(target, n => n.props && n.props.message), - opener = fine.searchParent(target, n => n.onShowEmoteCard, 200); + opener = fine.searchParent(target, n => n.onShowEmoteCard, 250); if ( ! line || ! opener ) return; diff --git a/src/sites/shared/player.jsx b/src/sites/shared/player.jsx index 40bd669a..498aea3c 100644 --- a/src/sites/shared/player.jsx +++ b/src/sites/shared/player.jsx @@ -1600,7 +1600,7 @@ export default class PlayerBase extends Module { const video = player.mediaSinkManager?.video || player.core?.mediaSinkManager?.video; if ( ! video ) return false; - + if ( ! video.src && ! video.srcObject ) return false; @@ -1610,6 +1610,8 @@ export default class PlayerBase extends Module { return false; } + // TODO: Validation for srcObject (if we need it) + return true; }