feat(player): linkify descriptions and play YouTube links inline
- Narrow the title hover target to the actual text, not the whole row. - Linkify descriptions: timestamps (mm:ss / hh:mm:ss) seek the player; emails become mailto:; hashtags link to YouTube's hashtag feed; other URLs open in a new tab. Blank lines are stripped so the popover isn't mostly whitespace. - YouTube links play in the inline player: a link to the current video seeks (honoring t=), a link to another video navigates the player to it, with a Back button to the original. While on a linked video the title/author come from the player and its views/date/duration + a clickable channel come from the detail endpoint, which falls back to the YouTube API (videos.list, attributed to the user) for videos not in our DB.
This commit is contained in:
parent
2a5660e01e
commit
47d0799407
3 changed files with 335 additions and 63 deletions
|
|
@ -51,6 +51,12 @@ export interface VideoDetail {
|
|||
id: string;
|
||||
description: string | null;
|
||||
like_count: number | null;
|
||||
in_db: boolean;
|
||||
channel_id: string | null;
|
||||
channel_title: string | null;
|
||||
published_at: string | null;
|
||||
view_count: number | null;
|
||||
duration_seconds: number | null;
|
||||
}
|
||||
|
||||
export interface FeedResponse {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue