diff --git a/src/App.tsx b/src/App.tsx index 4c26611..2ca2569 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -578,6 +578,11 @@ export default function App() { onSubLang={setSubLang} subStyle={subStyle} onSubStyle={setSubStyle} + onOpenChannel={() => { + setChannelId(playing.item.channel_id); + setSearch(""); + setPlayingIndex(null); + }} titleBarInset={titleBarInset} onPrev={ stepFrom(playingIndex, -1) != null diff --git a/src/components/Player.tsx b/src/components/Player.tsx index 6ccea0e..9905359 100644 --- a/src/components/Player.tsx +++ b/src/components/Player.tsx @@ -25,6 +25,8 @@ interface Props { subLang: string; subStyle: SubStyle; onSubStyle: (s: SubStyle) => void; + /** Leaves the player for this video's channel. */ + onOpenChannel: () => void; /** Persists a subtitle choice made from the transport bar. */ onSubLang: (l: string) => void; /** Position in the current feed, for the "3 of 180" readout. */ @@ -120,7 +122,8 @@ function placeCues(vtt: string, line: number | null): string { export default function Player({ item, path, onClose, onDelete, onPrev, onNext, onDownload, downloading, - maxHeight, subLang, onSubLang, subStyle, onSubStyle, index, total, titleBarInset, + maxHeight, subLang, onSubLang, subStyle, onSubStyle, onOpenChannel, + index, total, titleBarInset, }: Props) { const streaming = path === null; const [src, setSrc] = useState(path ? fileUrl(path) : null); @@ -361,9 +364,19 @@ export default function Player({ {index + 1}/{total} - - {item.channel_title} - + {/* A tag rather than a caption: it goes somewhere. */} +
+ +
{streaming ? ( error ? (