File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
WordPress/src/main/java/org/wordpress/android/ui/reader Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -162,10 +162,12 @@ class ReaderPostRenderer(
162162
163163 // IMPORTANT: use loadDataWithBaseURL() since loadData() may fail
164164 // https://code.google.com/p/android/issues/detail?id=4401
165- // also important to use null as the baseUrl since onPageFinished
166- // doesn't appear to fire when it's set to an actual url
165+ // Use android-app:// scheme as baseUrl to set HTTP referrer for YouTube embeds.
166+ // Google requires this for embedded videos to work properly.
167+ // https://developers.google.com/youtube/terms/required-minimum-functionality#set-the-referer
168+ // https://stackoverflow.com/questions/79761743/youtube-video-in-webview-gives-error-code-153-on-android/79809094#79809094
167169 webView.loadDataWithBaseURL(
168- null ,
170+ " https://wordpress.com/reader " ,
169171 htmlContent,
170172 " text/html" ,
171173 " UTF-8" ,
You can’t perform that action at this time.
0 commit comments