mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
4.33.4
* Added: Setting to force the use of legacy audio API constructors for browsers with compatibility issues. * Changed: Add support for Twitch's inline chat highlights.
This commit is contained in:
parent
4b5827f98b
commit
0b43b2f573
3 changed files with 25 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "frankerfacez",
|
||||
"author": "Dan Salvato LLC",
|
||||
"version": "4.33.3",
|
||||
"version": "4.33.4",
|
||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||
"private": true,
|
||||
"license": "Apache-2.0",
|
||||
|
|
|
@ -118,6 +118,17 @@ export default class PlayerBase extends Module {
|
|||
}
|
||||
});
|
||||
|
||||
this.settings.add('player.compressor.force-legacy', {
|
||||
default: false,
|
||||
ui: {
|
||||
path: 'Player > Compressor >> Advanced',
|
||||
title: 'Force use of legacy browser API.',
|
||||
description: 'This setting forces FrankerFaceZ to attempt to use an older browser API to create the compressor. Please reset your player after changing this setting.',
|
||||
component: 'setting-check-box',
|
||||
force_seen: true
|
||||
}
|
||||
});
|
||||
|
||||
this.settings.add('player.compressor.shortcut', {
|
||||
default: null,
|
||||
requires: ['player.compressor.enable'],
|
||||
|
@ -1424,6 +1435,9 @@ export default class PlayerBase extends Module {
|
|||
value = this.settings.get('player.gain.default');
|
||||
|
||||
try {
|
||||
if (this.settings.get('player.compressor.force-legacy'))
|
||||
throw new Error();
|
||||
|
||||
gain = video._ffz_gain = new GainNode(ctx, {
|
||||
gain: value
|
||||
});
|
||||
|
@ -1566,6 +1580,9 @@ export default class PlayerBase extends Module {
|
|||
video._ffz_context = ctx;
|
||||
let src;
|
||||
try {
|
||||
if (this.settings.get('player.compressor.force-legacy'))
|
||||
throw new Error();
|
||||
|
||||
src = video._ffz_source = new MediaElementAudioSourceNode(ctx, {
|
||||
mediaElement: video
|
||||
});
|
||||
|
@ -1577,6 +1594,9 @@ export default class PlayerBase extends Module {
|
|||
src.connect(ctx.destination);
|
||||
|
||||
try {
|
||||
if (this.settings.get('player.compressor.force-legacy'))
|
||||
throw new Error();
|
||||
|
||||
comp = video._ffz_compressor = new DynamicsCompressorNode(ctx);
|
||||
} catch (err) {
|
||||
this.log.info('Unable to use new DynamicsCompressorNode. Falling back to old method.');
|
||||
|
@ -1590,6 +1610,9 @@ export default class PlayerBase extends Module {
|
|||
value = this.settings.get('player.gain.default');
|
||||
|
||||
try {
|
||||
if (this.settings.get('player.compressor.force-legacy'))
|
||||
throw new Error();
|
||||
|
||||
gain = video._ffz_gain = new GainNode(ctx, {
|
||||
gain: value
|
||||
});
|
||||
|
|
|
@ -742,6 +742,7 @@ other {# messages were deleted by a moderator.}
|
|||
|
||||
const user_bits = [
|
||||
t.actions.renderInline(msg, this.props.showModerationIcons, u, r, e),
|
||||
this.renderInlineHighlight ? this.renderInlineHighlight() : null,
|
||||
e('span', {
|
||||
className: 'chat-line__message--badges'
|
||||
}, t.chat.badges.render(msg, e)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue