mirror of
https://github.com/shirt-dev/netflix-international.git
synced 2025-05-03 08:30:33 +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([
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"manifest_version": 2,
|
||||
"name": "Netflix International",
|
||||
"description": "Displays all available Netflix audio and subtitle tracks.",
|
||||
"version": "2.0.13",
|
||||
"version": "2.0.14",
|
||||
"author": "shirt",
|
||||
"browser_action": {
|
||||
"default_icon": "img/icon128.png",
|
||||
|
|
Loading…
Add table
Reference in a new issue