amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

video autoplay on AMP

Open SIbu1981 opened this issue 4 years ago • 7 comments

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

SIbu1981 avatar Feb 12 '21 14:02 SIbu1981

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.

kristoferbaxter avatar Feb 12 '21 16:02 kristoferbaxter

  • autoplay works if you use amp-video-iframe. As long as you follow the instructions to implement mute(), it should work just fine.

  • By sticky, do you mean allowing the video to stick to an edge of the viewport? If so, using amp-video-iframe in conjunction with amp-video-docking should enable that behavior.

alanorozco avatar Feb 16 '21 18:02 alanorozco

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.

gilbertococchi avatar Feb 17 '21 16:02 gilbertococchi

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.

alanorozco avatar Feb 17 '21 16:02 alanorozco

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.

gilbertococchi avatar Feb 17 '21 17:02 gilbertococchi

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

alanorozco avatar Feb 17 '21 17:02 alanorozco

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.

stale[bot] avatar Aug 12 '22 00:08 stale[bot]