Fix On Livestream

This commit is contained in:
TheBrokenRail 2022-05-14 19:57:37 -04:00
parent b4fab3498b
commit 751fa6191c
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@
"manifest_version": 2, "manifest_version": 2,
"name": "Force High-Resolution DisneyNOW", "name": "Force High-Resolution DisneyNOW",
"author": "TheBrokenRail", "author": "TheBrokenRail",
"version": "1.2", "version": "1.3",
"description": "This browser extension forces DisneyNOW to use their higher-resolution video stream by imitating the Android app. (It also blocks some DisneyNOW ads.)", "description": "This browser extension forces DisneyNOW to use their higher-resolution video stream by imitating the Android app. (It also blocks some DisneyNOW ads.)",
"homepage_url": "https://gitea.thebrokenrail.com/TheBrokenRail/force-high-resolution-disneynow", "homepage_url": "https://gitea.thebrokenrail.com/TheBrokenRail/force-high-resolution-disneynow",
"content_scripts": [ "content_scripts": [

View File

@ -96,7 +96,8 @@ Object.defineProperty(XMLHttpRequest.prototype, 'send', {
// Log Video Stream URL // Log Video Stream URL
this.addEventListener("load", function () { this.addEventListener("load", function () {
const obj = JSON.parse(this.responseText); const obj = JSON.parse(this.responseText);
const assetUrl = new URL(obj.video.assets.asset[0].value); const video = obj.video ? obj.video : obj.channels.channel[0];
const assetUrl = new URL(video.assets.asset[0].value);
console.log('Video Stream URL: ' + assetUrl); console.log('Video Stream URL: ' + assetUrl);
}); });