Last active
July 5, 2025 09:39
-
-
Save rinsuki/793c338af5f8d7a85d48d6a16e44a373 to your computer and use it in GitHub Desktop.
for some users which doesn't have a AV1 hardware decoder (e.g. Apple M1, M2, or other older GPU)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
let _mods = webpackChunkdiscord_app.push([[Symbol()],{},r=>r.c]); | |
webpackChunkdiscord_app.pop(); | |
const ProbablyStreamModule = Object.values(_mods).find(x => { | |
if (x.exports == null) return false | |
if (typeof x.exports !== "object") return false | |
const keys = Object.keys(x.exports) | |
if (keys.length !== 1) return false | |
const key = keys[0] | |
const value = x.exports[key] | |
if (value.prototype == null) return false | |
if (typeof value.prototype.setCodecs !== "function") return false | |
return true | |
}) | |
const ProbablyStreamClass = ProbablyStreamModule.exports[Object.keys(ProbablyStreamModule.exports)[0]] | |
const origInitialize = ProbablyStreamClass.prototype.initialize | |
ProbablyStreamClass.prototype.initialize = function (...args) { | |
this.__codecs = this.codecs | |
Object.defineProperty(this, "codecs", { | |
get() { | |
return this.__codecs ?? [] | |
}, | |
set(v) { | |
this.__codecs = v.filter(x => x.name !== "AV1") | |
}, | |
configurable: true, | |
}) | |
return origInitialize.apply(this, args) | |
} | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment