test(player): fix binge watching (2)

This commit is contained in:
Timothy Z. 2025-05-01 22:41:04 +03:00
parent 6bfe079030
commit 0efd1453bb

View file

@ -216,12 +216,12 @@ const Player = ({ urlParams, queryParams }) => {
const onNextVideoRequested = React.useCallback(() => {
if (player.nextVideo !== null) {
nextVideo();
const deepLinks = player.nextVideo.deepLinks;
if (deepLinks.metaDetailsStreams && deepLinks.player) {
if (deepLinks.player) {
window.location.replace(deepLinks.player);
} else {
window.location.replace(deepLinks.player ?? deepLinks.metaDetailsStreams);
} else if (deepLinks.metaDetailsStreams) {
window.location.replace(deepLinks.metaDetailsStreams);
}
}
}, [player.nextVideo]);