Hello Racket friends:
Please, if possible: could you verify** if the youtube procedure in the very useful scribble-embedding package is working fine for you?**
In my installation (Racket v9.1, under Windows 10 and the current version of scribble-embedding package), the following code:
Thank you very much in advance for your support on this issue. Kind regards,
E. Comer
P. S.
(a) The google-form procedure, is working fine.
(b) As a reference, the youtube procedure (in scribble-embedding package) worked fine when I use it, the years 2022-2025.
Thank you in advance to professorShriram, for the corresponding update in order to fix this [first] issue. And also for having created in the first place, the very practical and useful scribble-embedding package.
Unfortunately, this is going to depend on how the scribble doc is served as HTML (i.e. file://, http://, https://) and how the browser handles referrerPolicy. Scribble is not setting a <meta name="referrer" .../> tag so the referrer policy for the generated html will be whatever the browser determines it should be. Actually setting a referrer policy that will work for all schemes is particularly difficult for file:// schemes. Safari seems like it won't ever send a referrer for file:// scheme even when using "unsafe-url". If you are serving this from an http server, then "unsafe-url" works fine and many of the other non-strict referrerPolicy option should also work. From https should also allow for some of the strict options.
There are a couple of ways to set the referrer policy in HTML. First is to add a meta tag to the HTML and second is to add it directly to the iframe. There might be a way to do the first option via scribble, but I'm not sure without more research how to do that. The second option is probably more appropriate for a scribble-embedding fix and would be something along the lines of
I haven't investigated in detail, but I expect this will indeed be a challenge. Per RFC 9110 § 10.1.3:
The Referer header field has the potential to reveal information about the request context or browsing history of the user, which is a privacy concern … Most general-purpose user agents do not send the Referer header field when the referring resource is a local "file" or "data" URI.
The scribble-embedding package can certainly add a referrerpolicy attribute (maybe origin?) to help when documents are served over HTTP.
Scribble documents are designed to work from file:// URLs, but it is not clear to me if Google wants to support this usecase for YouTube anymore. I found Google documentation on an origin player parameter (which it says to use for SFSafariViewController embedding, which does not set Referer) and a “YouTube Player API Reference for iframe Embeds” (which seems more likely to be relevant than the docs on mobile app embedding), but, in some (non-exhaustive) experiments, I have not found a way to hand-write a HTML file embedding a YouTube video that works when opened through file://.
Thank you very much@LiberalArtistfor this suggestion. It would be great if in an updated version of scribble-embedding (hopefully soon, for the benefit of all users), your local-video procedure could be included.
Kind regards.
P. S. We hope someone technically proficient on the complexities of this issue (as indicated by @mwblakley and @soegaard), will be able to advance in solving it —may be by working first in the case when the Scribble doc is served as https, or http. Thanks again for your support.