YouTube error 153 in Android WebView
Some customers have recently reported YouTube embeds failing on mobile, especially on Android, with Error 153. This issue is related to how YouTube handles the referrer header .
YouTube embeds generated by the Iframely API are not affected by this issue and should work as expected on pages with a valid origin. We addressed a related issue back in September for websites that were using a strict no-referrer policy, so no additional actions or fixes are required from Iframely at this time.
If you are constructing YouTube embed codes manually, for example, by building your own iframe for the YouTube player URL, please ensure that the iframe includes the following attribute: referrerpolicy="strict-origin"
This allows YouTube to receive the correct origin information required for the player to load properly.
If you are still seeing Error 153 in a WebView environment, the most likely cause is that the WebView is not sending a referrer header at all. For example, this may depend on how WebView is configured or how it sets default origins when the source is a local file:/// system.
This article may help you troubleshoot and correctly set the referrer header in such WebView environments.