Skip to content

Commit

Permalink
Update cadmium-playercore to 6.0034.588.911.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGoddessInari committed Apr 21, 2022
1 parent f3977cd commit 5f89be6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ browser.webRequest.onBeforeRequest.addListener(
})
.then(response => response.text())
.then(text => {
// Version 6.0032.428.911 from https://assets.nflxext.com/en_us/ffe/player/html/cadmium-playercore-6.0032.694.911.js
if (text.includes(`return {version:"6.0032.694.911",`)) {
// Version 6.0034.588.911 from https://assets.nflxext.com/en_us/ffe/player/html/cadmium-playercore-6.0034.588.911.js
if (text.includes(`return {version:"6.0034.588.911",`)) {
// Use our profile lists
text = text.replace(`S={type:"standard",manifestVersion:z.Kh.xRa?"v2":"v1",viewableId:K,profiles:M`, `profiles=[];profiles.push(...${audio_profiles});use6Channels&&profiles.push(...["heaac-5.1-dash"]);profiles.push(...${avc_main_profiles});profiles.push(...${avc_high_profiles});useVP9&&profiles.push(...${vp9_profiles});profiles.push(...${base_profiles});S={type:"standard",manifestVersion:z.Kh.xRa?"v2":"v1",viewableId:K,profiles:profiles`);
text = text.replace(`L={type:"standard",manifestVersion:A.Yh.eXa?"v2":"v1",viewableId:F,profiles:I`, `profiles=[];profiles.push(...${audio_profiles});use6Channels&&profiles.push(...["heaac-5.1-dash"]);profiles.push(...${avc_main_profiles});profiles.push(...${avc_high_profiles});useVP9&&profiles.push(...${vp9_profiles});profiles.push(...${base_profiles});L={type:"standard",manifestVersion:A.Yh.eXa?"v2":"v1",viewableId:F,profiles:profiles`);
// Use our profiles in the profile group
text = text.replace(`S.profileGroups=[{name:"default",profiles:M}],`, `S.profileGroups=[{name:"default",profiles:profiles}],`);
text = text.replace(`L.profileGroups=[{name:"default",profiles:I}],`, `L.profileGroups=[{name:"default",profiles:profiles}],`);
// Re-enable Ctrl-Shift-S menu
text = text.replace(`this.N3.Fma && this.toggle();`, `this.toggle();`);
text = text.replace(`this.AW.jra && this.toggle();`, `this.toggle();`);
// Add Audio Format Description
text = text.replace(`displayName:k.displayName`, `displayName:k.displayName+ ("channels" in k ? " - "+k.channels : "")`);
// Add max_bitrate logic
text = text.replace(`:this.setMediaKeys(p);}`, `:this.setMediaKeys(p),setMaxBitrate&&(console.info("Attempting to set max bitrate:"),fnSetMaxBitrate()?console.info("max bitrate set"):console.error("failed to set max bitrate"));}`)
text = text.replace(`:this.setMediaKeys(q);}`, `:this.setMediaKeys(q),setMaxBitrate&&(console.info("Attempting to set max bitrate:"),fnSetMaxBitrate()?console.info("max bitrate set"):console.error("failed to set max bitrate"));}`)
}
filter.write(encoder.encode(text));
filter.close();
Expand Down
2 changes: 1 addition & 1 deletion src/cadmium-playercore.js

Large diffs are not rendered by default.

0 comments on commit 5f89be6

Please sign in to comment.