YouTube video mode #93
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
SBDeveloper/medley#93
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A mode to switch between audio-only and video mode (using YouTube), if you are interested in the videoclip.
Triage Notes
Not implemented anywhere (searched code, docs and glossary for video/YouTube). No prior rejection. Category
enhancement, stateneeds-triage, blocked on #94 (does the YouTube embed play in the Linux and Android webviews?).Decisions so far (draft in
docs/adr/0022-video-mode-embeds-the-youtube-player.md, term Video mode inGLOSSARY.md):plugin-apilookup, using the YouTube Data API with the user's own key.Risks: YouTube may reject the embed under Tauri's webview origin (error 153); the free API quota (100 units per search) is easily hit on a fresh Library.
Once #94 is resolved, this gets an agent brief or goes to
wontfixif the embed can't work.Agent brief
Prototype #94 settled the embed question; see ADR 0022 (accepted).
Key finding: the YouTube IFrame player gives error 153 under
tauri://localhost(Linux), works underhttp://tauri.localhost(Android). Use a player page served fromhttp://localhost:<port>by the shell, iframed into the video pane, driven viapostMessage. Reference: branchprototype/94-youtube-embed(scripts/proto-yt/player.html,ui/src/lib/PrototypeYoutube.svelte). Do not merge it; port the idea.Scope (follow ADR 0022 rules): host-owned video pane; additive
plugin-apilookup Track -> video ID; YouTube plugin using the Data API with the user's key andnetworkcapability; match cache per Recording; "wrong video?" correction; sticky per-Device Video mode; fallback to audio on no match or quota error; hidden in Offline mode; CSP update; localhost server insrc-tauri.Acceptance: plays and advances the Queue on ended; pause/seek/position reach the host; works on Linux release build and Android release build.
Implemented on branch
ticket/93-youtube-video-mode(not merged yet).What it does
video_lookupplugin capability andplugin-apitypes;plugins/optional/youtube(Data API, user's own key) ranks candidates by channel, title, length and category; matches are cached per Recording; "Wrong video?" picks another candidate, "Search again" re-runs the lookup.http://localhost:<port>) because the embed refusestauri://localhost(#94); Android release builds allow cleartext to loopback only.Known limits
Tests:
crates/core/tests/video.rs(24), ranking unit tests in the plugin. Existing failures onmainunrelated to this:discord_presence,low_delay;listenbrainzis flaky.