mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-18 12:52:52 +00:00
add extra subtitles to video
This commit is contained in:
parent
9fadcf3a0b
commit
660a04b78b
1 changed files with 12 additions and 0 deletions
|
|
@ -63,6 +63,18 @@ const Player = ({ urlParams }) => {
|
|||
});
|
||||
}
|
||||
}, [player.selected && player.selected.stream]);
|
||||
useDeepEqualEffect(() => {
|
||||
dispatch({
|
||||
commandName: 'addSubtitlesTracks',
|
||||
commandArgs: {
|
||||
tracks: player.subtitles_resources
|
||||
.filter((subtitles_resource) => subtitles_resource.content.type === 'Ready')
|
||||
.reduce((tracks, subtitles_resource) => {
|
||||
return tracks.concat(subtitles_resource.content.content);
|
||||
}, [])
|
||||
}
|
||||
});
|
||||
}, [player.subtitles_resources]);
|
||||
return (
|
||||
<div className={styles['player-container']}>
|
||||
<Video
|
||||
|
|
|
|||
Loading…
Reference in a new issue