mirror of
https://github.com/shirt-dev/netflix-international.git
synced 2025-06-22 00:36:43 +00:00
Disable AV1 in non-chromium browsers
This commit is contained in:
parent
2a06fa2286
commit
a7bb37d62f
2 changed files with 23 additions and 4 deletions
|
@ -2,6 +2,20 @@
|
|||
// This script runs as a drop-in replacement of the original cadmium-playercore. This is not a content script.
|
||||
console.log("Netflix International script active!");
|
||||
|
||||
/* eslint-disable no-undef */
|
||||
// https://stackoverflow.com/a/45985333
|
||||
function getBrowser() {
|
||||
if (typeof chrome !== "undefined") {
|
||||
if (typeof browser !== "undefined") {
|
||||
return "Firefox";
|
||||
} else {
|
||||
return "Chrome";
|
||||
}
|
||||
} else {
|
||||
return "Edge";
|
||||
}
|
||||
}
|
||||
|
||||
function do_patch(desc, needle, replacement) {
|
||||
var match = cadmium_src.match(needle);
|
||||
if (!match) {
|
||||
|
@ -79,10 +93,15 @@ function get_profile_list() {
|
|||
"vp9-profile0-L30-dash-cenc",
|
||||
"vp9-profile0-L31-dash-cenc",
|
||||
"vp9-profile0-L40-dash-cenc",
|
||||
"av1-main-L30-dash-cbcs-prk",
|
||||
"av1-main-L31-dash-cbcs-prk",
|
||||
"av1-main-L40-dash-cbcs-prk",
|
||||
]);
|
||||
|
||||
if (getBrowser() == "Chrome") {
|
||||
custom_profiles = custom_profiles.concat([
|
||||
"av1-main-L30-dash-cbcs-prk",
|
||||
"av1-main-L31-dash-cbcs-prk",
|
||||
"av1-main-L40-dash-cbcs-prk",
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
custom_profiles = custom_profiles.concat([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue