mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 06:32:11 +00:00
rewind item on video ended
This commit is contained in:
parent
d343cb6a07
commit
0578556fa3
1 changed files with 11 additions and 2 deletions
|
|
@ -62,8 +62,17 @@ const Player = ({ urlParams }) => {
|
|||
setVideoState({ [propName]: propValue });
|
||||
}, []);
|
||||
const onEnded = React.useCallback(() => {
|
||||
// console.log('ended');
|
||||
}, []);
|
||||
core.dispatch({ action: 'Unload' }, 'Player');
|
||||
if (player.lib_item !== null) {
|
||||
core.dispatch({
|
||||
action: 'Ctx',
|
||||
args: {
|
||||
action: 'RewindLibraryItem',
|
||||
args: player.lib_item._id
|
||||
}
|
||||
});
|
||||
}
|
||||
}, [player.lib_item && player.lib_item._id]);
|
||||
const onError = React.useCallback(() => {
|
||||
// console.error(error);
|
||||
}, []);
|
||||
|
|
|
|||
Loading…
Reference in a new issue