Skip to content

Ba/issue 3 #21849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from

Conversation

BeatrizAlmeida03
Copy link

Description

The issue, described in #21171, involved a bug where inserting a YouTube video via URL in the video block resulted in the raw link being displayed instead of an embedded, playable video in the preview. This occurred because the app relied on plain HTML and did not process the URL properly for embedding.

To fix this, we modified the WordPress/src/main/java/org/wordpress/android/ui/WPWebViewActivity.java file to wrap the provided video URL in an <iframe> element, ensuring it is recognized and rendered as an actual embedded video during preview.

Testing instructions

  • Click the 'Create a post or page' icon
  • Click the 'Blog post' button
  • Click the 'Video' icon
  • Click the 'Insert from URL'
  • Enter a valid URL, e.g., "https://youtu.be/g-6g2uEjF1s?si=fkwLragUSjLV7x1u"
  • Tap the 'Done' button on the keyboard
  • Click the outside of the 'Insert from URL' pop-up
  • Click the 'Three-dot' menu
  • Click the 'Preview' button

closes #21171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Added audio or video URLs are not parsed correctly, resulting in unplayable media blocks
1 participant