Skip to content

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

Closed

Description

@gturpin-dev

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"

Activity

  1. fluiddot commented on Jun 13, 2022

    @fluiddot
    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.

  2. added
    [Type] BugAn existing feature does not function as intended
    on Jun 13, 2022
  3. gturpin-dev commented on Jun 13, 2022

    @gturpin-dev
    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 :)

  4. fluiddot commented on Jun 13, 2022

    @fluiddot
    Contributor

    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.

  5. gturpin-dev commented on Jun 14, 2022

    @gturpin-dev
    Author

    It was an interesting discussion, thanks for your time.

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

  6. added
    [Priority] LowUsed to indicate that the issue at hand isn't a top priority to address and can be handled later
    on Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Mobile App - i.e. Android or iOSNative mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)[Priority] LowUsed to indicate that the issue at hand isn't a top priority to address and can be handled later[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions