Skip to content
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

When editing a post, loading a version from another device fails to load video #15184

Closed
startuptester opened this issue Oct 28, 2020 · 2 comments

Comments

@startuptester
Copy link
Contributor

Expected behavior

All blocks should load properly when editing from another device

Actual behavior

If I add a video block to a post and then view it in preview on another device, I will get this message when I return to the app to edit:
image
If I select, “From this device”, everything is fine.
But if I choose “From another device”, I get:

Steps to reproduce the behavior

  1. Add a video block to a post
  2. view it in preview on another device
  3. When you get this message:
    image
    Select, “From this device”
    Result: everything is fine
    But if you choose “From another device”:
    image
Tested on iPhone 12 Pro, iOS 14.1, WPiOS 16.0.0.3
@fluiddot
Copy link
Contributor

I didn't manage to reproduce it with two devices using the WPiOS app, however it happened to me when using the web version. Looks like there's some kind of incompatibility on the HTML produced in video blocks when they're used in the native app and web.

The steps for reproducing it are:

  1. In the app
    1. Create/edit a post
    2. Add a video block
    3. Insert a video
    4. Save the post
  2. In the web
    1. Open the post
    2. Observe that the HTML code is different when changing to code editor
    3. Save the post
  3. In the app again
    1. Open the post
    2. Observe that the video block shows an error

As an example, here is the HTML produced in each case:

Native app (WPiOS)

<!-- wp:video {"id":<MEDIA_ID>} -->
<figure class="wp-block-video"><video controls src="<VIDEO_SRC>"></video></figure>
<!-- /wp:video -->

Web

When opened first time with code editor:

<!-- wp:video {"autoplay":false,"id":<MEDIA_ID>,"loop":false,"muted":false,"src":"<VIDEO_SRC>"} -->
<figure class="wp-block-video"><video controls src="<VIDEO_SRC>"></video></figure>
<!-- /wp:video -->

When opened with visual editor:

In this case the web version generates a preview, maybe this is related to why it produces a different HTML code.

<!-- wp:video {"autoplay":false,"guid":"<VIDEO_GUID>","id":<MEDIA_ID>,"loop":false,"muted":false,"src":"<VIDEO_SRC>","videoPressClassNames":"wp-block-embed is-type-video is-provider-videopress"} -->
<figure class="wp-block-video wp-block-embed is-type-video is-provider-videopress"><div class="wp-block-embed__wrapper">
https://videopress.com/v/<VIDEO_GUID>?preloadContent=metadata
</div></figure>
<!-- /wp:video -->

Tested on iPhone 11, iOS 14.2, WPiOS 17.0 (17.0.1.0).

@fluiddot
Copy link
Contributor

fluiddot commented May 6, 2024

I couldn't manage to reproduce this issue in version 24.7. Most likely it has been fixed via WordPress/gutenberg#30987, so we can close it.

@fluiddot fluiddot closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants