mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
test(player): fix binge watching (3)
This commit is contained in:
parent
0efd1453bb
commit
980d0038ec
1 changed files with 12 additions and 7 deletions
|
|
@ -215,14 +215,19 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
|
||||
const onNextVideoRequested = React.useCallback(() => {
|
||||
if (player.nextVideo !== null) {
|
||||
nextVideo();
|
||||
const deepLinks = player.nextVideo.deepLinks;
|
||||
|
||||
if (deepLinks.player) {
|
||||
window.location.replace(deepLinks.player);
|
||||
} else if (deepLinks.metaDetailsStreams) {
|
||||
window.location.replace(deepLinks.metaDetailsStreams);
|
||||
}
|
||||
const navigateToPlayer = deepLinks.player ? deepLinks.player : null;
|
||||
const navigateToDetails = deepLinks.metaDetailsStreams ? deepLinks.metaDetailsStreams : null;
|
||||
|
||||
nextVideo();
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
if (navigateToPlayer) {
|
||||
window.location.replace(navigateToPlayer);
|
||||
} else if (navigateToDetails) {
|
||||
window.location.replace(navigateToDetails);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, [player.nextVideo]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue