Show YouTube/Vimeo as external poster cards in the Reader #40

Closed
opened 2026-08-03 18:57:13 +00:00 by TheAnachronism · 1 comment

Parent

Part of #30

Implements docs/specs/reader-media.md.

What to build

In the Reader, detect allowlisted YouTube and Vimeo iframe/href shapes and replace them with full-width 16:9 poster cards (modest max height ~40–50% viewport) that open the watch URL externally (Custom Tabs / external app). No in-app embed WebView and no arbitrary iframes beyond YouTube/Vimeo. Tap opens; article swipe and vertical scroll stay reliable. Failed/missing poster still yields a usable card with Open media (watch URL) and Open original.

Acceptance criteria

  • Allowlisted YouTube/Vimeo iframes or links become poster + play cards in the Reader (not raw iframes / invisible HTML)
  • Tapping the card opens the watch URL externally; no in-app embed WebView
  • Cards are full content width at 16:9 with a modest max height so short articles are not dominated
  • Horizontal article swipe and vertical scroll still work around embed cards
  • Failure / missing poster still offers Open media (watch URL) and Open original
  • Non-allowlisted iframes are not newly embedded by this work

Blocked by

  • Blocked by: #38 Prefer full-res images/GIFs and promote leftover image enclosures in the Reader
## Parent Part of #30 Implements [`docs/specs/reader-media.md`](https://git.anachronis.dev/TheAnachronism/tt-rss-viewer/src/branch/master/docs/specs/reader-media.md). ## What to build In the **Reader**, detect allowlisted YouTube and Vimeo iframe/`href` shapes and replace them with full-width 16:9 poster cards (modest max height ~40–50% viewport) that open the watch URL externally (Custom Tabs / external app). No in-app embed WebView and no arbitrary iframes beyond YouTube/Vimeo. Tap opens; article swipe and vertical scroll stay reliable. Failed/missing poster still yields a usable card with Open media (watch URL) and Open original. ## Acceptance criteria - [ ] Allowlisted YouTube/Vimeo iframes or links become poster + play cards in the Reader (not raw iframes / invisible HTML) - [ ] Tapping the card opens the watch URL externally; no in-app embed WebView - [ ] Cards are full content width at 16:9 with a modest max height so short articles are not dominated - [ ] Horizontal article swipe and vertical scroll still work around embed cards - [ ] Failure / missing poster still offers Open media (watch URL) and Open original - [ ] Non-allowlisted iframes are not newly embedded by this work ## Blocked by - Blocked by: #38 Prefer full-res images/GIFs and promote leftover image enclosures in the Reader
Author
Owner

Resolution

Implemented on master (24881b4):

  • Planner: detect allowlisted YouTube/Vimeo iframe/href shapes into ReaderEmbedRef, dedupe by provider+id, strip only those tags (non-allowlisted iframes left alone)
  • UI: lib/reader/reader_embed_card.dart — full-width 16:9 poster with ~45% max height; tap / Open media → watch URL externally; Open original; play icon fallback if poster fails
  • Tests extended in test/reader/reader_media_plan_test.dart
  • No in-app embed WebView
## Resolution Implemented on `master` (`24881b4`): - Planner: detect allowlisted YouTube/Vimeo iframe/`href` shapes into `ReaderEmbedRef`, dedupe by provider+id, strip only those tags (non-allowlisted iframes left alone) - UI: [`lib/reader/reader_embed_card.dart`](https://git.anachronis.dev/TheAnachronism/tt-rss-viewer/src/branch/master/lib/reader/reader_embed_card.dart) — full-width 16:9 poster with ~45% max height; tap / Open media → watch URL externally; Open original; play icon fallback if poster fails - Tests extended in [`test/reader/reader_media_plan_test.dart`](https://git.anachronis.dev/TheAnachronism/tt-rss-viewer/src/branch/master/test/reader/reader_media_plan_test.dart) - No in-app embed WebView
Sign in to join this conversation.
No description provided.