Update player internals #499 (fixes player muting and buffering mitigation)

This commit is contained in:
pixeltris
2026-02-24 20:52:30 +00:00
parent 5a853805c6
commit 3a1ff51d9c
4 changed files with 18 additions and 6 deletions
+5 -2
View File
@@ -1,7 +1,7 @@
// ==UserScript==
// @name TwitchAdSolutions (vaft)
// @namespace https://github.com/pixeltris/TwitchAdSolutions
// @version 33.0.0
// @version 34.0.0
// @description Multiple solutions for blocking Twitch ads (vaft)
// @updateURL https://github.com/pixeltris/TwitchAdSolutions/raw/master/vaft/vaft.user.js
// @downloadURL https://github.com/pixeltris/TwitchAdSolutions/raw/master/vaft/vaft.user.js
@@ -13,7 +13,7 @@
// ==/UserScript==
(function() {
'use strict';
const ourTwitchAdSolutionsVersion = 20;// Used to prevent conflicts with outdated versions of the scripts
const ourTwitchAdSolutionsVersion = 21;// Used to prevent conflicts with outdated versions of the scripts
if (typeof window.twitchAdSolutionsVersion !== 'undefined' && window.twitchAdSolutionsVersion >= ourTwitchAdSolutionsVersion) {
console.log("skipping vaft as there's another script active. ourVersion:" + ourTwitchAdSolutionsVersion + " activeVersion:" + window.twitchAdSolutionsVersion);
window.twitchAdSolutionsVersion = ourTwitchAdSolutionsVersion;
@@ -809,6 +809,9 @@
}
let player = findReactNode(reactRootNode, node => node.setPlayerActive && node.props && node.props.mediaPlayerInstance);
player = player && player.props && player.props.mediaPlayerInstance ? player.props.mediaPlayerInstance : null;
if (player?.playerInstance) {
player = player.playerInstance;
}
const playerState = findReactNode(reactRootNode, node => node.setSrc && node.setInitialPlaybackSettings);
return {
player: player,