mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 17:15:48 +00:00
fix: player nextVideo fix
Signed-off-by: Lachezar Lechev <lachezar@ambire.com>
This commit is contained in:
parent
5b94c92878
commit
e9c7c4fcec
1 changed files with 8 additions and 3 deletions
|
|
@ -210,11 +210,16 @@ const Player = ({ urlParams, queryParams }) => {
|
|||
}, []);
|
||||
|
||||
const onNextVideoRequested = React.useCallback(() => {
|
||||
if (player.nextVideo !== null) {
|
||||
nextVideo();
|
||||
|
||||
console.log('Before nextVideo()');
|
||||
nextVideo();
|
||||
console.log('after nextVideo()');
|
||||
});
|
||||
React.useEffect(() => {
|
||||
if (player.nextVideo !== null && player.nextVideo.deepLinks !== null) {
|
||||
const deepLinks = player.nextVideo.deepLinks;
|
||||
if (deepLinks.metaDetailsStreams && deepLinks.player) {
|
||||
console.log('Next: window.location.replace() & window.location.href = deepLinks.player');
|
||||
|
||||
window.location.replace(deepLinks.metaDetailsStreams);
|
||||
window.location.href = deepLinks.player;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue