mirror of
https://github.com/shirt-dev/netflix-international.git
synced 2025-05-04 08:30:34 +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.
|
// 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!");
|
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) {
|
function do_patch(desc, needle, replacement) {
|
||||||
var match = cadmium_src.match(needle);
|
var match = cadmium_src.match(needle);
|
||||||
if (!match) {
|
if (!match) {
|
||||||
|
@ -79,11 +93,16 @@ function get_profile_list() {
|
||||||
"vp9-profile0-L30-dash-cenc",
|
"vp9-profile0-L30-dash-cenc",
|
||||||
"vp9-profile0-L31-dash-cenc",
|
"vp9-profile0-L31-dash-cenc",
|
||||||
"vp9-profile0-L40-dash-cenc",
|
"vp9-profile0-L40-dash-cenc",
|
||||||
|
]);
|
||||||
|
|
||||||
|
if (getBrowser() == "Chrome") {
|
||||||
|
custom_profiles = custom_profiles.concat([
|
||||||
"av1-main-L30-dash-cbcs-prk",
|
"av1-main-L30-dash-cbcs-prk",
|
||||||
"av1-main-L31-dash-cbcs-prk",
|
"av1-main-L31-dash-cbcs-prk",
|
||||||
"av1-main-L40-dash-cbcs-prk",
|
"av1-main-L40-dash-cbcs-prk",
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
custom_profiles = custom_profiles.concat([
|
custom_profiles = custom_profiles.concat([
|
||||||
"heaac-2-dash",
|
"heaac-2-dash",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Netflix International",
|
"name": "Netflix International",
|
||||||
"description": "Displays all available Netflix audio and subtitle tracks.",
|
"description": "Displays all available Netflix audio and subtitle tracks.",
|
||||||
"version": "2.0.13",
|
"version": "2.0.14",
|
||||||
"author": "shirt",
|
"author": "shirt",
|
||||||
"browser_action": {
|
"browser_action": {
|
||||||
"default_icon": "img/icon128.png",
|
"default_icon": "img/icon128.png",
|
||||||
|
|
Loading…
Add table
Reference in a new issue