mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-05-09 20:25:14 +02:00
Hls player works now; fixed vupload.com regex
This commit is contained in:
parent
2db8381df7
commit
e5552910b2
@ -98,7 +98,8 @@ class Vivo implements Match {
|
||||
|
||||
class Vupload implements Match {
|
||||
async match(match: RegExpMatchArray): Promise<string> {
|
||||
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]
|
||||
]
|
||||
|
@ -8,6 +8,6 @@
|
||||
<body>
|
||||
<video id="video"></video>
|
||||
<p id="message" hidden></p>
|
||||
<script src="/res/hls.light.min.js"></script>
|
||||
<script src="/res/hls.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,3 +1,6 @@
|
||||
body
|
||||
background-color: #131313
|
||||
|
||||
html, body, video
|
||||
width: 100%
|
||||
height: 100%
|
||||
|
@ -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 <a href="https://github.com/ByteDream/stream-bypass/issues">here</a>.
|
||||
Try to refresh the page and if the error still exists you might want to open a new issue <a href="https://github.com/ByteDream/stream-bypass/issues/new">here</a>.
|
||||
When your using <a href="https://www.torproject.org/">Tor</a> 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 <a href="https://github.com/ByteDream/stream-bypass/issues">here</a>`)
|
||||
showMessage(`Failed to play m3u8 video (hls is not supported). Try again or create a new issue <a href="https://github.com/ByteDream/stream-bypass/issues/new">here</a>`)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user