mirror of
https://github.com/shirt-dev/netflix-international.git
synced 2025-05-06 00:50:33 +00:00
v2.0.7: Chromium Edge Support
This commit is contained in:
parent
994c72c8a3
commit
087295e482
5 changed files with 75 additions and 22 deletions
|
@ -26,6 +26,7 @@ var cadmium_src = request.responseText;
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
function get_profile_list() {
|
function get_profile_list() {
|
||||||
|
// Always add h264 profiles
|
||||||
var custom_profiles = [
|
var custom_profiles = [
|
||||||
"playready-h264mpl30-dash",
|
"playready-h264mpl30-dash",
|
||||||
"playready-h264mpl31-dash",
|
"playready-h264mpl31-dash",
|
||||||
|
@ -33,25 +34,71 @@ function get_profile_list() {
|
||||||
"playready-h264hpl30-dash",
|
"playready-h264hpl30-dash",
|
||||||
"playready-h264hpl31-dash",
|
"playready-h264hpl31-dash",
|
||||||
"playready-h264hpl40-dash",
|
"playready-h264hpl40-dash",
|
||||||
"heaac-2-dash",
|
];
|
||||||
"heaac-2hq-dash",
|
|
||||||
|
if (window.MSMediaKeys) {
|
||||||
|
// Chromium Edge Specific
|
||||||
|
|
||||||
|
// Always add 2.0 AAC profiles, some manifests fail without them
|
||||||
|
custom_profiles = custom_profiles.concat([
|
||||||
|
"heaac-2-dash",
|
||||||
|
"heaac-2hq-dash",
|
||||||
|
]);
|
||||||
|
|
||||||
|
if (globalOptions.useDDPlus) {
|
||||||
|
// Dolby Digital
|
||||||
|
custom_profiles = custom_profiles.concat([
|
||||||
|
"ddplus-2.0-dash",
|
||||||
|
]);
|
||||||
|
|
||||||
|
if (globalOptions.use6Channels) {
|
||||||
|
custom_profiles = custom_profiles.concat([
|
||||||
|
"ddplus-5.1-dash",
|
||||||
|
"ddplus-5.1hq-dash",
|
||||||
|
"ddplus-atmos-dash",
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// No Dolby Digital
|
||||||
|
if (globalOptions.use6Channels) {
|
||||||
|
custom_profiles = custom_profiles.concat([
|
||||||
|
"heaac-5.1-dash",
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Chrome, Firefox Specific
|
||||||
|
|
||||||
|
if (!globalOptions.disableVP9) {
|
||||||
|
// Add VP9 Profiles if wanted
|
||||||
|
custom_profiles = custom_profiles.concat([
|
||||||
|
"vp9-profile0-L30-dash-cenc",
|
||||||
|
"vp9-profile0-L31-dash-cenc",
|
||||||
|
"vp9-profile0-L40-dash-cenc",
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
custom_profiles = custom_profiles.concat([
|
||||||
|
"heaac-2-dash",
|
||||||
|
"heaac-2hq-dash",
|
||||||
|
]);
|
||||||
|
|
||||||
|
if (globalOptions.use6Channels) {
|
||||||
|
custom_profiles = custom_profiles.concat([
|
||||||
|
"heaac-5.1-dash",
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Always add subtitles
|
||||||
|
custom_profiles = custom_profiles.concat([
|
||||||
"simplesdh",
|
"simplesdh",
|
||||||
"nflx-cmisc",
|
"nflx-cmisc",
|
||||||
"BIF240",
|
"BIF240",
|
||||||
"BIF320"
|
"BIF320",
|
||||||
];
|
]);
|
||||||
|
|
||||||
if (!globalOptions.disableVP9) {
|
|
||||||
custom_profiles = custom_profiles.concat([
|
|
||||||
"vp9-profile0-L30-dash-cenc",
|
|
||||||
"vp9-profile0-L31-dash-cenc",
|
|
||||||
"vp9-profile0-L40-dash-cenc",
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (globalOptions.use6Channels) {
|
|
||||||
custom_profiles.push("heaac-5.1-dash");
|
|
||||||
}
|
|
||||||
|
|
||||||
return custom_profiles;
|
return custom_profiles;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,7 @@ chromeStorageGet({
|
||||||
showAllTracks: true,
|
showAllTracks: true,
|
||||||
setMaxBitrate: false,
|
setMaxBitrate: false,
|
||||||
disableVP9: false,
|
disableVP9: false,
|
||||||
|
useDDPlus: false,
|
||||||
}).then(items => {
|
}).then(items => {
|
||||||
// very messy workaround for accessing chrome storage outside of background / content scripts
|
// very messy workaround for accessing chrome storage outside of background / content scripts
|
||||||
let mainScript = document.createElement("script");
|
let mainScript = document.createElement("script");
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Netflix International",
|
"name": "Netflix International",
|
||||||
"description": "Displays all available Netflix audio tracks.",
|
"description": "Displays all available Netflix audio tracks.",
|
||||||
"version": "2.0.6",
|
"version": "2.0.7",
|
||||||
"author": "shirt",
|
"author": "shirt",
|
||||||
"browser_action": {
|
"browser_action": {
|
||||||
"default_icon": "img/icon128.png"
|
"default_icon": "img/icon128.png"
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
<input type="checkbox" id="setMaxBitrate"><label for="setMaxBitrate">Automatically select best bitrate available</label>
|
<input type="checkbox" id="setMaxBitrate"><label for="setMaxBitrate">Automatically select best bitrate available</label>
|
||||||
<br>
|
<br>
|
||||||
<input type="checkbox" id="disableVP9"><label for="disableVP9">Disable VP9 codec</label>
|
<input type="checkbox" id="disableVP9"><label for="disableVP9">Disable VP9 codec</label>
|
||||||
|
<br>
|
||||||
|
<input type="checkbox" id="useDDPlus"><label for="useDDPlus">Use Dolby Digital Plus (Chromium Edge)</label>
|
||||||
|
|
||||||
<div id="status"></div>
|
<div id="status"></div>
|
||||||
<button id="save">Save</button>
|
<button id="save">Save</button>
|
||||||
|
|
|
@ -4,12 +4,14 @@ function save_options() {
|
||||||
const showAllTracks = document.getElementById("showAllTracks").checked;
|
const showAllTracks = document.getElementById("showAllTracks").checked;
|
||||||
const setMaxBitrate = document.getElementById("setMaxBitrate").checked;
|
const setMaxBitrate = document.getElementById("setMaxBitrate").checked;
|
||||||
const disableVP9 = document.getElementById("disableVP9").checked;
|
const disableVP9 = document.getElementById("disableVP9").checked;
|
||||||
|
const useDDPlus = document.getElementById("useDDPlus").checked;
|
||||||
|
|
||||||
chrome.storage.sync.set({
|
chrome.storage.sync.set({
|
||||||
use6Channels,
|
use6Channels: use6Channels,
|
||||||
showAllTracks,
|
showAllTracks: showAllTracks,
|
||||||
setMaxBitrate,
|
setMaxBitrate: setMaxBitrate,
|
||||||
disableVP9,
|
disableVP9: disableVP9,
|
||||||
|
useDDPlus: useDDPlus,
|
||||||
}, function() {
|
}, function() {
|
||||||
var status = document.getElementById("status");
|
var status = document.getElementById("status");
|
||||||
status.textContent = "Options saved.";
|
status.textContent = "Options saved.";
|
||||||
|
@ -25,6 +27,7 @@ function restore_options() {
|
||||||
showAllTracks: true,
|
showAllTracks: true,
|
||||||
setMaxBitrate: false,
|
setMaxBitrate: false,
|
||||||
disableVP9: false,
|
disableVP9: false,
|
||||||
|
useDDPlus: false,
|
||||||
}, function(items) {
|
}, function(items) {
|
||||||
document.getElementById("use51").checked = items.use6Channels;
|
document.getElementById("use51").checked = items.use6Channels;
|
||||||
document.getElementById("showAllTracks").checked = items.showAllTracks;
|
document.getElementById("showAllTracks").checked = items.showAllTracks;
|
||||||
|
|
Loading…
Add table
Reference in a new issue