Add "disableSendMetadata" patch

This commit is contained in:
redphx
2024-10-22 09:14:11 +07:00
parent 9ab63c4a53
commit 01502363ab
2 changed files with 22 additions and 0 deletions

View File

@@ -971,6 +971,16 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
str = PatcherUtils.replaceWith(str, index, 'return', 'return () => {};');
return str;
},
disableSendMetadata(str: string) {
let text = 'this.sendMetadata(),this.isStreamActive()';
if (!str.includes(text)) {
return false;
}
str = str.replaceAll(text, 'true; return;' + text);
return str;
},
};
let PATCH_ORDERS: PatchArray = [
@@ -1046,6 +1056,10 @@ let PLAYING_PATCH_ORDERS: PatchArray = [
'alwaysShowStreamHud',
...(getPref(PrefKey.BLOCK_TRACKING) ? [
'disableSendMetadata',
] : []),
// 'exposeEventTarget',
// Patch volume control for normal stream