package org.terst.feedreader.ui /** * Recognising a YouTube placeholder link, and loading an embed that actually plays. * * Split out of ReaderWebView for the usual reason: this is string work with no WebView, no * gestures and no Compose in it, so it can be exercised without a device -- which matters here * because the bug it fixes is invisible until a video is tapped. * * **Why the embed needs a referrer.** The player dialog called * `loadUrl("https://www.youtube-nocookie.com/embed/")` and YouTube answered with "Video * player configuration error -- Error 153", reported as "YouTube play is misconfigured". The * embed refuses to play for a page it cannot attribute to a site. Measured on an Android user * agent: * * | how the embed is loaded | result | * |--------------------------------------------|-----------| * | plain, no referrer | Error 153 | * | with `&origin=` in the query | Error 153 | * | inside an `