Skip to content

Commit

Permalink
again
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed Jun 2, 2024
1 parent b448d64 commit 96e0989
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion examples/standalone/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const player = Player.make<Ctx>('#player', {
source: DANMAKU //SUPER_DANMAKU
}),
new Playlist({
initialIndex,
initialIndex: 7,
sources: [
{
title: 'HLS with SRT subtitle',
Expand Down
6 changes: 1 addition & 5 deletions packages/torrent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ class TorrentPlugin implements PlayerPlugin {
torrent.files.forEach((file) => {
if (!foundMp4 && file.name.endsWith('.mp4') && file.renderTo) {
foundMp4 = true
file.renderTo($video, {
autoplay: $video.autoplay,
controls: false,
maxBlobLength: 2 * 1024 * 1000 * 1000 // 2 GB
})
file.renderTo($video)
this.player.once('loadedmetadata', (e) => {
this.player.emit('canplay', e)
})
Expand Down
12 changes: 2 additions & 10 deletions packages/ui/src/components/Subtitle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,18 +217,10 @@ export class Subtitle {
const { src, encoding, type = 'auto' } = currentSubtitle

if (src.startsWith('blob:')) {
$track.addEventListener(
'load',
() => {
this.changeOffset()
this.show()
},
{ once: true }
)

this.changeOffset()
this.show()
$track.src = src
$iosTrack && ($iosTrack.src = src)

return
}

Expand Down

0 comments on commit 96e0989

Please sign in to comment.