Skip to content

Commit

Permalink
fix: subtitle loss when switching videos with different resolutions (#87
Browse files Browse the repository at this point in the history
)
  • Loading branch information
msterzhang committed May 28, 2023
1 parent 9e072ce commit e2691df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pages/home/previews/aliyun_video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ const Preview = () => {
replace(videos[index + 1].name)
}
})
// Fixed subtitle loss when switching videos with different resolutions
if(subtitle){
player.on("video:play", (url) => {
player.subtitle.url = proxyLink(subtitle, true);
});
}
})
})
onCleanup(() => {
Expand Down

0 comments on commit e2691df

Please sign in to comment.