ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

video autoplay on AMP #32631

Open SIbu1981 opened 3 years ago

SIbu1981 commented 3 years ago

hi we use amp-video-iframe to serve our customized jw player in our article pages. Starting from this use case are there any chance to build video autoplay and sticky on our pages?

I have a look to some implementation in the our market and someone reached the objective but using the amp player component like https://amp.dev/documentation/components/amp-brightcove/) not the amp-video-iframe.

URL: https://sport.sky.it/calcio/serie-a/2021/02/12/napoli-juventus-pirlo-conferenza-video/amp

Thanks Silvio

kristoferbaxter commented 3 years ago

I've added @alanorozco to the issue, but autoplay requires ensuring the content is muted by default. I do not recall all of the details, but Alan can give a more in-depth answer to this question.

alanorozco commented 3 years ago
gilbertococchi commented 3 years ago

Hi believe @SIbu1981 point was on how Docking is possible with amp-video-iframe.

amp-video-docking allows docking only if the video has not autoplay but it seems like other AMP certified players allow this behaviour.

alanorozco commented 3 years ago

amp-video-docking allows docking only if the video has not autoplay but it seems like other AMP certified players allow this behaviour.

This is incorrect. amp-video-iframe works just fine with dock, here's an example.

What you may be experiencing is that autoplaying videos cannot be docked. Videos with autoplay need to be interacted with (clicked) before they can be docked, which is intentional.

gilbertococchi commented 3 years ago

Thanks Alan, sorry I meant to say the same, the limitation is expected on amp-video-iframe + amp-video-docking but other combo with amp-video-docking with other players are indeed allowing docking without user interaction with a video in autoplay.

alanorozco commented 3 years ago

@gilbertococchi One player seems to get around this limitation somehow, which it should not. Tracking separately #32706

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.