fix(player): a step onto an unplayable video carries on the way it went
Previous onto an embed-blocked or removed video skipped forward again (the auto-advance direction), straight back to the item just left. The player now remembers the direction of the step that reached the item and the videos YouTube refused this session: an error carries on that way, Previous / Next pass over known-dead items without loading them, and go dark when only those are left. A step of your own skips with auto-advance off too.
This commit is contained in:
@@ -27,6 +27,8 @@ export function PlayerTransportControls({
|
||||
variant,
|
||||
index,
|
||||
queueLength,
|
||||
canPrev,
|
||||
canNext,
|
||||
autoMode,
|
||||
loopMode,
|
||||
onPrev,
|
||||
@@ -37,6 +39,9 @@ export function PlayerTransportControls({
|
||||
variant: "docked" | "modal";
|
||||
index: number;
|
||||
queueLength: number;
|
||||
/** Whether there is a playable item that way (one YouTube refused is passed over). */
|
||||
canPrev: boolean;
|
||||
canNext: boolean;
|
||||
autoMode: AutoMode;
|
||||
loopMode: LoopMode;
|
||||
onPrev: () => void;
|
||||
@@ -70,7 +75,7 @@ export function PlayerTransportControls({
|
||||
name: t("player.previous"),
|
||||
title: `${t("player.previous")} · Shift+←`,
|
||||
onClick: onPrev,
|
||||
disabled: index === 0,
|
||||
disabled: !canPrev,
|
||||
labelFrom: "sm",
|
||||
},
|
||||
{
|
||||
@@ -79,7 +84,7 @@ export function PlayerTransportControls({
|
||||
name: t("player.next"),
|
||||
title: `${t("player.next")} · Shift+→`,
|
||||
onClick: onNext,
|
||||
disabled: index === queueLength - 1,
|
||||
disabled: !canNext,
|
||||
labelFrom: "sm",
|
||||
trailing: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user