diff --git a/src/match.ts b/src/match.ts index 89e3bdb..3fa7b1a 100644 --- a/src/match.ts +++ b/src/match.ts @@ -98,7 +98,8 @@ class Vivo implements Match { class Vupload implements Match { async match(match: RegExpMatchArray): Promise { - return `https://www3.megaupload.to/${match[0]}/v.mp4` + // the best quality is the last match so the array is reversed here to have the last element at the first position + return match.reverse()[0] } } @@ -127,5 +128,5 @@ const matches = [ ['vivo.st', new RegExp(/(?<=source:\s')(\S+)(?=')/gm), new Vivo(), Reliability.HIGH], ['vivo.sx', new RegExp(/(?<=source:\s')(\S+)(?=')/gm), new Vivo(), Reliability.HIGH], ['voe.sx', new RegExp(/https?:\/\/\S*m3u8(?=")/gm), null, Reliability.HIGH], - ['vupload.com', new RegExp(/(?<=class\|)\w*/gm), new Vupload(), Reliability.NORMAL] + ['vupload.com', new RegExp(/(?<=src:\s?")\S+mp4/gm), new Vupload(), Reliability.NORMAL] ] diff --git a/src/res/hls.html b/src/res/hls.html index 0191af6..dee155c 100644 --- a/src/res/hls.html +++ b/src/res/hls.html @@ -8,6 +8,6 @@ - + - \ No newline at end of file + diff --git a/src/res/hls.sass b/src/res/hls.sass index c12671a..0943cfc 100644 --- a/src/res/hls.sass +++ b/src/res/hls.sass @@ -1,3 +1,6 @@ +body + background-color: #131313 + html, body, video width: 100% height: 100% diff --git a/src/res/hls.ts b/src/res/hls.ts index 5795c63..8c64cfe 100644 --- a/src/res/hls.ts +++ b/src/res/hls.ts @@ -35,7 +35,7 @@ function loadHls() { break case 3: // high message = `The reliability for this domains is high, errors like this are very unlikely to happen. - Try to refresh the page and if the error still exists you might want to open a new issue here. + Try to refresh the page and if the error still exists you might want to open a new issue here. When your using Tor such errors have a slight chance to occur more often, so if this is the case just try to reload the page and see if you it's working then` break @@ -45,6 +45,8 @@ function loadHls() { showMessage(`Could not load hls video. ${message}`) }, rawReliability * 3000) + document.title = searchParams.get('domain') + // @ts-ignore hls.on(Hls.Events.MANIFEST_PARSED, () => { clearTimeout(thirdPartyFallback) @@ -53,7 +55,7 @@ function loadHls() { }) } else { // shows a message if hls is not supported - showMessage(`Failed to play m3u8 video (hls is not supported). Try again or create a new issue here`) + showMessage(`Failed to play m3u8 video (hls is not supported). Try again or create a new issue here`) } }