mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-01 15:38:31 +00:00
4.20.39
* Fixed: Playback statistics not appearing when experiencing a specific player experiment. * Fixed: Layout issues when viewing a Watch Party with certain features enabled. Note that currently we aren't properly supporting Watch Parties due to the oddly extensive changes they make to the layout. Instead, we just disable certain features when a Watch Party is detected. This may change in the future. Closes #906. Closes #898. * Fixed: Issue with incorrect profile priorities being followed when highlighting badges. Closes #908. * Fixed: Issue with sending whisper messages sometimes breaking whisper UI. Closes #904 * Fixed: Chat font size overrides not working in a specific situation. * Fixed: Incorrect tool-tips for emotes with modifiers.
This commit is contained in:
parent
472f9472ee
commit
64f7a513a8
10 changed files with 68 additions and 36 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "frankerfacez",
|
||||
"author": "Dan Salvato LLC",
|
||||
"version": "4.20.38",
|
||||
"version": "4.20.39",
|
||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
|
|
|
@ -486,7 +486,8 @@ export default class Chat extends Module {
|
|||
const c = item.c || null,
|
||||
v = item.v;
|
||||
|
||||
colors.set(v, c);
|
||||
if ( ! colors.has(v) )
|
||||
colors.set(v, c);
|
||||
}
|
||||
|
||||
return colors;
|
||||
|
|
|
@ -321,7 +321,7 @@ export default class Metadata extends Module {
|
|||
skippedFrames: temp.dropped_frames,
|
||||
videoResolution: `${temp.vid_width}x${temp.vid_height}`
|
||||
}
|
||||
} else if ( player.stats || player.core?.stats ) {
|
||||
} else {
|
||||
const videoHeight = maybe_call(player.getVideoHeight, player) || 0,
|
||||
videoWidth = maybe_call(player.getVideoWidth, player) || 0,
|
||||
displayHeight = maybe_call(player.getDisplayHeight, player) || 0,
|
||||
|
@ -338,8 +338,9 @@ export default class Metadata extends Module {
|
|||
displayWidth,
|
||||
rate: maybe_call(player.getPlaybackRate, player),
|
||||
fps: Math.floor(maybe_call(player.getVideoFrameRate, player) || 0),
|
||||
hlsLatencyBroadcaster: player.stats?.broadcasterLatency || player.core?.stats?.broadcasterLatency,
|
||||
hlsLatencyEncoder: player.stats?.transcoderLatency || player.core?.stats?.transcoderLatency,
|
||||
hlsLatencyBroadcaster: maybe_call(player.getLiveLatency, player) || 0,
|
||||
//hlsLatencyBroadcaster: player.stats?.broadcasterLatency || player.core?.stats?.broadcasterLatency,
|
||||
//hlsLatencyEncoder: player.stats?.transcoderLatency || player.core?.stats?.transcoderLatency,
|
||||
playbackRate: Math.floor((maybe_call(player.getVideoBitRate, player) || 0) / 1000),
|
||||
skippedFrames: maybe_call(player.getDroppedFrames, player),
|
||||
}
|
||||
|
|
|
@ -332,6 +332,11 @@ export default class Channel extends Module {
|
|||
if ( ! props?.channelLogin )
|
||||
props = props?.children?.props;
|
||||
|
||||
const watching = props?.watchPartyProps?.isShowingWatchPartyInMain;
|
||||
this.settings.updateContext({
|
||||
isWatchParty: watching
|
||||
});
|
||||
|
||||
if ( el._ffz_links && props.channelLogin !== el._ffz_link_login ) {
|
||||
const login = el._ffz_link_login = props.channelLogin;
|
||||
if ( login ) {
|
||||
|
|
|
@ -425,9 +425,9 @@ export default class ChatHook extends Module {
|
|||
});
|
||||
|
||||
this.settings.add('chat.use-width', {
|
||||
requires: ['chat.width', 'context.ui.rightColumnExpanded'],
|
||||
requires: ['chat.width', 'context.ui.rightColumnExpanded', 'context.isWatchParty'],
|
||||
process(ctx) {
|
||||
if ( ! ctx.get('context.ui.rightColumnExpanded') )
|
||||
if ( ! ctx.get('context.ui.rightColumnExpanded') || ctx.get('context.isWatchParty') )
|
||||
return false;
|
||||
|
||||
return ctx.get('chat.width') != 340;
|
||||
|
@ -631,7 +631,7 @@ export default class ChatHook extends Module {
|
|||
this.css_tweaks.setVariable('chat-width', `${width/10}rem`);
|
||||
this.css_tweaks.setVariable('negative-chat-width', `${-width/10}rem`);
|
||||
|
||||
this.css_tweaks.toggle('chat-font', size !== 12 || font);
|
||||
this.css_tweaks.toggle('chat-font', size !== 12 || font !== 'inherit');
|
||||
this.css_tweaks.toggle('chat-width', this.settings.get('chat.use-width'));
|
||||
|
||||
this.css_tweaks.toggle('emote-alignment-padded', emote_alignment === 1);
|
||||
|
|
|
@ -178,38 +178,50 @@ export default class ChatLine extends Module {
|
|||
cls.prototype.render = function() {
|
||||
this._ffz_no_scan = true;
|
||||
|
||||
if ( ! this.props.message || ! this.props.message.content )
|
||||
if ( ! this.props.message || ! this.props.message.content || ! this.props.message.from )
|
||||
return old_render.call(this);
|
||||
|
||||
const msg = t.chat.standardizeWhisper(this.props.message),
|
||||
try {
|
||||
const msg = t.chat.standardizeWhisper(this.props.message),
|
||||
|
||||
is_action = msg.is_action,
|
||||
user = msg.user,
|
||||
raw_color = t.overrides.getColor(user.id) || user.color,
|
||||
color = t.parent.colors.process(raw_color),
|
||||
is_action = msg.is_action,
|
||||
user = msg.user,
|
||||
raw_color = t.overrides.getColor(user.id) || user.color,
|
||||
color = t.parent.colors.process(raw_color),
|
||||
|
||||
tokens = msg.ffz_tokens = msg.ffz_tokens || t.chat.tokenizeMessage(msg, null, null),
|
||||
contents = t.chat.renderTokens(tokens, e),
|
||||
tokens = msg.ffz_tokens = msg.ffz_tokens || t.chat.tokenizeMessage(msg, null, null),
|
||||
contents = t.chat.renderTokens(tokens, e),
|
||||
|
||||
override_name = t.overrides.getName(user.id);
|
||||
override_name = t.overrides.getName(user.id);
|
||||
|
||||
return e('div', {className: 'thread-message__message'},
|
||||
e('div', {className: 'tw-pd-x-1 tw-pd-y-05'}, [
|
||||
e('span', {
|
||||
className: `thread-message__message--user-name notranslate${override_name ? ' ffz--name-override' : ''}`,
|
||||
style: {
|
||||
color
|
||||
}
|
||||
}, override_name || user.displayName),
|
||||
e('span', null, is_action ? ' ' : ': '),
|
||||
e('span', {
|
||||
className: 'message',
|
||||
style: {
|
||||
color: is_action && color
|
||||
}
|
||||
}, contents)
|
||||
])
|
||||
);
|
||||
return e('div', {className: 'thread-message__message'},
|
||||
e('div', {className: 'tw-pd-x-1 tw-pd-y-05'}, [
|
||||
e('span', {
|
||||
className: `thread-message__message--user-name notranslate${override_name ? ' ffz--name-override' : ''}`,
|
||||
style: {
|
||||
color
|
||||
}
|
||||
}, override_name || user.displayName),
|
||||
e('span', null, is_action ? ' ' : ': '),
|
||||
e('span', {
|
||||
className: 'message',
|
||||
style: {
|
||||
color: is_action && color
|
||||
}
|
||||
}, contents)
|
||||
])
|
||||
);
|
||||
|
||||
} catch(err) {
|
||||
t.log.error(err);
|
||||
t.log.capture(err, {
|
||||
extra: {
|
||||
props: this.props
|
||||
}
|
||||
});
|
||||
|
||||
return old_render.call(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Do this after a short delay to hopefully reduce the chance of React
|
||||
|
|
|
@ -92,8 +92,11 @@ export default class CSSTweaks extends Module {
|
|||
});
|
||||
|
||||
this.settings.add('layout.use-chat-fix', {
|
||||
requires: ['context.force_chat_fix', 'layout.swap-sidebars', 'layout.use-portrait', 'chat.use-width'],
|
||||
requires: ['context.force_chat_fix', 'layout.swap-sidebars', 'layout.use-portrait', 'chat.use-width', 'context.isWatchParty'],
|
||||
process(ctx) {
|
||||
if ( ctx.get('context.isWatchParty') )
|
||||
return false;
|
||||
|
||||
return ctx.get('context.force_chat_fix') || ctx.get('layout.swap-sidebars') || ctx.get('layout.use-portrait') || ctx.get('chat.use-width')
|
||||
},
|
||||
changed: val => {
|
||||
|
@ -223,6 +226,10 @@ export default class CSSTweaks extends Module {
|
|||
|
||||
this.settings.add('layout.swap-sidebars', {
|
||||
default: false,
|
||||
requires: ['context.isWatchParty'],
|
||||
process(ctx, val) {
|
||||
return ctx.get('context.isWatchParty') ? false : val;
|
||||
},
|
||||
ui: {
|
||||
path: 'Appearance > Layout >> Side Navigation',
|
||||
title: 'Swap Sidebars',
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
.video-chat__message-list-wrapper,
|
||||
.whispers-thread__content,
|
||||
.chat-list--other,
|
||||
.chat-list--default,
|
||||
.chat-list {
|
||||
font-size: var(--ffz-chat-font-size);
|
||||
line-height: var(--ffz-chat-line-height);
|
||||
|
|
|
@ -73,8 +73,11 @@ export default class Layout extends Module {
|
|||
})
|
||||
|
||||
this.settings.add('layout.use-portrait', {
|
||||
requires: ['layout.portrait', 'layout.portrait-threshold', 'context.route.name', 'context.size'],
|
||||
requires: ['layout.portrait', 'layout.portrait-threshold', 'context.route.name', 'context.size', 'context.isWatchParty'],
|
||||
process(ctx) {
|
||||
if ( ctx.get('context.isWatchParty') )
|
||||
return false;
|
||||
|
||||
const size = ctx.get('context.size');
|
||||
if ( ! size || ! ctx.get('layout.portrait') || ! PORTRAIT_ROUTES.includes(ctx.get('context.route.name')) )
|
||||
return false;
|
||||
|
|
|
@ -401,6 +401,7 @@
|
|||
|
||||
img {
|
||||
position: absolute;
|
||||
pointer-events: none !important;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue