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

I2I: `amp-video-iframe` #16252

Closed
alanorozco opened this Issue Jun 22, 2018 · 3 comments

Comments

@alanorozco
Copy link
Member

alanorozco commented Jun 22, 2018

Background

AMP provides a set of video players that range from simple wrappers to <video> elements (<amp-video>) to 3p embeds (e.g. <amp-youtube>, <amp-vimeo>, etc.). By virtue of implementing an interface, these players also get a common set of features like analytics, autoplay, rotate-to-fullscreen, minimize to corner on scroll, etc.

Since AMP doesn't allow JS, it's a common use case to embed complex video players using <amp-iframe>. However, these don't get these features since amp-iframe is a general-purpose iframe wrapper.

An alternative is to create a custom player component, but this is prohibitive since it expects a lot of investment from an external contributor. Supporting custom components also incurs a cost for the AMP team.

Markup

  • poster attribute required
  • src/srcdoc required

// TODO

Goal

To implement a generic 3p iframe-based video player for AMP.

  Custom component <amp-iframe> <amp-video-iframe>
Development cost HIGH LOW LOW
Gets video features YES NO YES

Integration

The iframe document must integrate with the component by sending the corresponding messages and responding to requests accordingly. To make it easier for developers, we'll provide a library that authors can employ to simplify the process of communicating with the host document.

More info.

Usage of amp-video-iframe for advertising

Just like amp-iframe, amp-video-iframe will reject frames that appear to be ads. Advertising use cases should use amp-ad instead.

The reasons for this policy are that:

  • amp-video-iframe enforces sandboxing and the sandbox is also applied to child iframes. This means landing pages may be broken, even if the ad itself appears to work.
  • amp-video-iframe has no fully iframe controlled resize mechanism.

Pre/mid/post-roll ads are allowed.

/cc @aghassemi @PerformDev @ericlindley-g

@aghassemi

This comment has been minimized.

Copy link
Member

aghassemi commented Jun 22, 2018

👍 couple of suggestions:
1- let's make poster or placeholder required. poster won't support srcset but placeholder with amp-img could. Also placeholder might be needed for click-to-play
2- I recommend against supporting srcdoc, we can't allow allow-same-origin with srcdoc and without allow-same-origin, I don't see a real player being able to work properly.

@ampprojectbot

This comment has been minimized.

Copy link
Collaborator

ampprojectbot commented Nov 28, 2018

This issue hasn't been updated in awhile. @alanorozco Do you have any updates?

@mrjoro

This comment has been minimized.

Copy link
Member

mrjoro commented Jan 15, 2019

Status Update #20173 says "Launched: amp-video-iframe 🎉" so I'm closing this. Please reopen or file new issues if there's anything left to track.

@mrjoro mrjoro closed this Jan 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.