mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
periodically push changes in library from player
This commit is contained in:
parent
38b7f71d86
commit
3e05fe2e31
1 changed files with 13 additions and 0 deletions
|
|
@ -220,6 +220,19 @@ const Player = ({ urlParams }) => {
|
|||
}, 'player');
|
||||
}
|
||||
}, [videoState.time, videoState.duration]);
|
||||
React.useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
core.dispatch({
|
||||
action: 'Player',
|
||||
args: {
|
||||
action: 'PushToLibrary'
|
||||
}
|
||||
}, 'player');
|
||||
}, 30000);
|
||||
return () => {
|
||||
clearInterval(interval);
|
||||
};
|
||||
}, []);
|
||||
React.useLayoutEffect(() => {
|
||||
const onKeyDown = (event) => {
|
||||
switch (event.code) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue