mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-20 02:32:14 +00:00
revert some shit, logging subtitles, added p(1) and p(2) for testing torrents,
This commit is contained in:
parent
eb5c8e1098
commit
37aad6ba73
6 changed files with 10160 additions and 1 deletions
|
|
@ -219,6 +219,8 @@
|
|||
<script src="https://cdn.jsdelivr.net/npm/webtorrent@latest/webtorrent.min.js" defer></script>
|
||||
<script src="torrentHandler.js" defer></script>
|
||||
<script src="rangeParser.js" defer></script>
|
||||
<script src="bundle.js"></script>
|
||||
<script src="subtitletest.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
10137
app/bundle.js
Normal file
10137
app/bundle.js
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -136,6 +136,7 @@ video[src=""] {
|
|||
width: 100%;
|
||||
align-self: center;
|
||||
padding: 1rem 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.volume {
|
||||
|
|
|
|||
8
app/subtitletest.js
Normal file
8
app/subtitletest.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
parser.once('tracks', function (tracks) {
|
||||
console.log(tracks)
|
||||
})
|
||||
|
||||
|
||||
parser.on('subtitle', function (subtitle, trackNumber) {
|
||||
console.log('Track ' + trackNumber + ':', subtitle)
|
||||
})
|
||||
|
|
@ -26,7 +26,17 @@ const client = new WebTorrent(),
|
|||
]
|
||||
client.remove('06d67cc41f44fd57241551b6d95c2d1de38121ae')
|
||||
|
||||
|
||||
//for debugging
|
||||
function t(a) {
|
||||
switch (a) {
|
||||
case 1:
|
||||
addTorrent("https://webtorrent.io/torrents/sintel.torrent")
|
||||
break;
|
||||
case 2:
|
||||
addTorrent("https://webtorrent.io/torrents/tears-of-steel.torrent")
|
||||
break;
|
||||
}
|
||||
}
|
||||
WEBTORRENT_ANNOUNCE = announceList
|
||||
.map(function (arr) {
|
||||
return arr[0]
|
||||
|
|
@ -81,6 +91,7 @@ function addTorrent(magnet) {
|
|||
}
|
||||
})
|
||||
video.src = `/webtorrent/${torrent.infoHash}/${encodeURI(videoFile.path)}`
|
||||
torrent.files[0].createReadStream().pipe(parser)
|
||||
document.location.href = "#player"
|
||||
nowPlaying(selected)
|
||||
halfmoon.toggleModal("tsearch")
|
||||
|
|
|
|||
BIN
miru.lnk
BIN
miru.lnk
Binary file not shown.
Loading…
Reference in a new issue