summaryrefslogtreecommitdiff
path: root/BACKLOG.md
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-10-21 23:47:13 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-10-21 23:47:13 +0000
commit4dd59a40c8a8fed3008082da45e29c1c188b7fe8 (patch)
tree6beb517fe10c731013bbdd42c4c88c81cc4fe8a7 /BACKLOG.md
parent9210bf463a8818595f7ca42486a787d4f1941d55 (diff)
Play the YouTube embed with a referrer instead of in an iframe
Peter, on the previous build: "the inline player now plays the audio but the video is a black screen." So Error 153 is gone and the stream is decoding -- what is left is a display problem. The iframe was not needed in the first place. A `Referer` header alone satisfies the embed, which means the player can be the WebView's own ordinary top-level document again. That drops two constructs the last build added: a `loadDataWithBaseURL` page, whose origin is synthetic, and a cross-origin subframe inside it. Both have a history of rendering video oddly in WebView, and the black screen appeared with them. Measured on an Android user agent -- no referrer: Error 153; `&origin=` in the query: Error 153; inside an iframe: plays; with a `Referer` header: plays. The referrer is a constant on a reserved `.invalid` domain rather than the article's URL, so YouTube learns which app asked and nothing about what is being read -- the same reason the nocookie domain is used. Confirmed in the app's own WebView: the embed loads with no error, 854x480, readyState 4, playing. NOT confirmed: that a picture now reaches the screen. This emulator cannot render video in a WebView at all -- it hard-crashed the AVD twice, including on a plain <video> in an ordinary non-dialog WebView -- so the one thing that matters here can only be checked on real hardware. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B
Diffstat (limited to 'BACKLOG.md')
-rw-r--r--BACKLOG.md26
1 files changed, 21 insertions, 5 deletions
diff --git a/BACKLOG.md b/BACKLOG.md
index bb7f075..b5ec9ba 100644
--- a/BACKLOG.md
+++ b/BACKLOG.md
@@ -52,11 +52,27 @@ dialog, main-frame navigation locked to YouTube's own domains), so watching
a video doesn't leave the reader.
**Fixed 2026-10-21, reported as "YouTube play is misconfigured":** the dialog
-loaded the embed as its own top-level document, and YouTube answers that with
-"Video player configuration error -- Error 153". An embed has to be embedded;
-it now sits in an `<iframe>` on a minimal host page (`YouTubeLinks`). Measured
-in the app's own WebView, before and after: top-level, 0 requests for the video
-stream and the error on screen; framed, 8 stream requests and no error.
+loaded the embed with no referrer, and YouTube answers that with "Video player
+configuration error -- Error 153". It now sends a `Referer` header
+(`YouTubeLinks`), which is enough on its own. Measured on an Android user
+agent: no referrer, Error 153; `&origin=` in the query, Error 153; inside an
+iframe, plays; with a `Referer` header, plays.
+
+The iframe was tried first and shipped briefly. It worked, but it meant hosting
+the embed in a `loadDataWithBaseURL` document -- a synthetic origin with the
+video in a cross-origin subframe of it -- and Peter then reported audio playing
+over a black screen. Both of those are WebView constructs with a history of
+rendering video oddly and neither was needed, so the referrer replaced them.
+
+**Not verified here: video actually appearing.** The emulator cannot render
+video in a WebView at all -- it hard-crashes the whole AVD, twice, including on
+a plain `<video>` element in an ordinary non-dialog WebView. Everything short of
+display is confirmed on-device (no error, 854x480, readyState 4, playing), but
+whether a picture reaches the screen can only be answered on real hardware. If
+it is still black, the question that splits the remaining causes is whether
+YouTube's own title and scrubber are visible in the black area: visible means
+only the video texture is missing, absent means the whole player is not
+compositing.
**Added at the same time:** a long-press on the thumbnail opens the video in
the YouTube app instead of the link-actions menu. A tap already plays it in the