magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.56k stars 9.32k forks source link

Autoplay not working for YouTube and Vimeo videos. #38691

Closed Varshal24 closed 6 months ago

Varshal24 commented 6 months ago

Preconditions (*)

Tested on this versions:

  1. Magento 2.4-develop branch
  2. Magento 2.4.7
  3. Magento 2.4.6
  4. Magento 2.4.5

Description (*)

The YouTube and Vimeo videos are not auto-playing when the page loads, as they are supposed to when the mentioned configuration in the 'steps to reproduce' section is enabled. Additionally, I changed the autoplay configuration in the Firefox browser, but it still did not work. I checked on several other browsers such as Opera, Safari, Edge, etc., but autoplay did not function. I noticed that some browsers restrict autoplay, which is why I verified this issue across multiple browsers and modified the Firefox configuration, but the autoplay feature did not work.

I have also verified that the browser autoplay is not restricted and works after changing the settings, by running a YouTube video in an HTML file.

Firefox configuration: image

Steps to reproduce (*)

  1. Set the YouTube API Key in Store -> Configuration -> Catalog -> Catalog -> Product Video under this configuration.
  2. Additionally, enable the settings below named “Autostart base video” and “Auto restart video”.
  3. Create a product and add a Vimeo or YouTube video, then make it the base by selecting the base checkbox.
  4. Visit the front end and open the same product.
  5. Now the video is supposed to autoplay after the page loads, but it's not auto-playing.

Expected result (*)

  1. Youtube and Vimeo videos should be autoplay when the ‘Product Video’ configuration is set.

Actual result (*)

  1. The YouTube and Vimeo video autoplay feature is not working.

Similar Issues: https://github.com/magento/magento2/issues/34652, https://github.com/magento/magento2/issues/37849

m2-assistant[bot] commented 6 months ago

Hi @Varshal24. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 6 months ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 6 months ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 6 months ago

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 6 months ago

Hi @engcom-Bravo, here is your Magento Instance: https://6f5d6f146d66fa117473f55caacca821.instances-prod.magento-community.engineering Admin access: https://6f5d6f146d66fa117473f55caacca821.instances-prod.magento-community.engineering/admin_c4b9 Login: fc4a33f4 Password: b4291b25f91a

engcom-Bravo commented 6 months ago

Hi @Varshal24,

Thanks for your reporting and collaboration.

We have verified the issue in latest 2.4-develop instance and the issue is not reproducible.kindly refer the attached video.

Steps to reproduce

Youtube and Vimeo videos with Google Chrome

https://github.com/magento/magento2/assets/51680745/ff2b7b3b-fb75-4e47-8223-b4e3c40a5a42

Youtube and Vimeo videos with Mozilla Firefox

https://github.com/magento/magento2/assets/51680745/94ce088b-e01f-47fd-8969-d6dcbe86598f

Could you please let us know if we are missing anything.

Thanks.