When I set the HTML of the browser widget I get errors in Windows 11 that don’t occur in MacOS. Specifically loading a YouTube video, a Vimeo video, and a video from an AWS server bring up an error or don’t load at all in Windows, but load nicely in MacOS.
Livecode 10.0.0
Sample stacks:
https://artsinteractive-data.s3.amazonaws.com/MITA/Misc/Browser%20HTML.zip
This archive contains two identical stacks but named differently Mac/ Win.
Open the stacks in LC 10 or LC 11 in both Windows 11 and MacOS Sonoma.
Clicking the various test buttons should load a video or website. The website loads OK, but the other choices don’t load properly in Windows.
A possible issue that I see: In Windows, the URL field of the inspector for the browser widget will contain the URL encoded HTML. The Mac version will remain empty.
I’m primarily loading YouTube videos in the browser via HTML and using JavaScript handlers to control the video via YouTube API calls. This works great on the Mac, but a video won’t load at all in Windows. Is there a bug with the Windows browser, or is this a CEF browser limitation?
The 153 error indicated by the YT page YouTube’s iFrame Player API doc explains:
Error 153 – The request does not include the HTTP Referer header or equivalent API Client identification. See API Client Identity and Credentials for more information.
That page:
Says: “API Clients that use the YouTube embedded player (including the YouTube IFrame Player API) must provide identification through the HTTP Referer request header. In some environments, the browser will automatically set HTTP Referer, and API Clients need only ensure they are not setting the Referrer-Policy in a way that suppresses the Referer value. YouTube recommends using strict-origin-when-cross-origin Referrer-Policy, which is already the default in many browsers.”
If this is truly the problem, I can’t set a referrer header (according to AI). At any rate, I’m seeing markedly different results with HTML in the browser widget Mac vs. Windows.