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

[iOS] Block Vidéo with autoplay not working #41573

Open
gturpin-dev opened this issue Jun 7, 2022 · 4 comments
Open

[iOS] Block Vidéo with autoplay not working #41573

gturpin-dev opened this issue Jun 7, 2022 · 4 comments
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Bug An existing feature does not function as intended

Comments

@gturpin-dev
Copy link

Hi

Description

A bug happens only on iOS device on the "video" block with autoplay enabled. The video never start.

I fix the bug by adding playsinline attribute to the video block

Step-by-step reproduction instructions

  1. To reproduce the bug you must go to a page or post.
  2. You must create a video block and add a video
  3. You must enable autoplay ( maybe repeat and sound off )

Expected behaviour

The video must start when she appears on the screen

Actual behaviour

The video doesn't start.

WordPress information

  • WordPress version: "6.0"
  • Gutenberg version: "Not installed"
  • Are all plugins except Gutenberg deactivated? "Yes"
  • Are you using a default theme (e.g. Twenty Twenty-One)? "Yes"

Device information

  • Device: "iPhone 11"
  • Operating system: "iOS 14.0"
@gturpin-dev gturpin-dev added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label Jun 7, 2022
@fluiddot
Copy link
Contributor

Hey @gturpin-dev 👋 ! Thanks for reporting the issue 🙇 .

I checked it further and I'm not sure if the behavior you describe is an actual bug. As far as I checked, the video autoplay feature is usually controlled by the browser and is only allowed under certain scenarios. For example, in Chromium browsers, a video is only auto-played if it has the attribute muted. On Safari, on the other hand, it requires to have both muted and playsinline attributes.

I think we can't really expand the logic of the Video block to ensure that the autoplay functionality will be applied since ultimately, this depends on the browser.

@fluiddot fluiddot added the [Type] Bug An existing feature does not function as intended label Jun 13, 2022
@gturpin-dev
Copy link
Author

Thanks for explanations.

So would it be wrong to add playsinline to support safari everytime the muted attribute is added ?

I understand what you said about browser but do you think Safari will support it soon ?
I think it's also our job to support that kind of things.

Tell me if i'm wrong :)

@fluiddot
Copy link
Contributor

fluiddot commented Jun 13, 2022

So would it be wrong to add playsinline to support safari everytime the muted attribute is added ?

That would be one option but not sure if it should be automatically enabled. The content could be viewed with any browser, not just Safari, so this workaround might be not necessary in all cases. Besides, it might be a bit confusing for the user that changing one of the attributes of the Video block enables other ones at the same time 🤔 .

I'm wondering if we could inform the user and let them decide whether to enable other attributes when setting the autoplay attribute.

I understand what you said about browser but do you think Safari will support it soon ? I think it's also our job to support that kind of things.

Tell me if i'm wrong :)

My gut feeling about the autoplay issue in Safari is that is more related to a user experience enhancement than lack of support. I guess that the purpose of not allowing videos to autoplay with sound is to prevent disturbing the user. Although, I'm not sure why Safari also requires the playsinline.

@gturpin-dev
Copy link
Author

It was an interesting discussion, thanks for your time.

If there is nothing to do, you can close this isssue.

@fluiddot fluiddot added the [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later label Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants