Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,12 @@ class ReaderPostRenderer(

// IMPORTANT: use loadDataWithBaseURL() since loadData() may fail
// https://code.google.com/p/android/issues/detail?id=4401
// also important to use null as the baseUrl since onPageFinished
// doesn't appear to fire when it's set to an actual url
// Use android-app:// scheme as baseUrl to set HTTP referrer for YouTube embeds.
// Google requires this for embedded videos to work properly.
// https://developers.google.com/youtube/terms/required-minimum-functionality#set-the-referer
// https://stackoverflow.com/questions/79761743/youtube-video-in-webview-gives-error-code-153-on-android/79809094#79809094
webView.loadDataWithBaseURL(
null,
"https://wordpress.com/reader",
htmlContent,
"text/html",
"UTF-8",
Expand Down