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

amp-ima-video: Support source #8842

Closed
aghassemi opened this issue Apr 19, 2017 · 2 comments
Closed

amp-ima-video: Support source #8842

aghassemi opened this issue Apr 19, 2017 · 2 comments
Assignees
Labels
Projects

Comments

@aghassemi
Copy link
Contributor

aghassemi commented Apr 19, 2017

<amp-video-ima>
  <source src="forrest_gump.mp4" type="video/mp4">
  <source src="forrest_gump.ogg" type="video/ogg">
</amp-video-ima>

should work.

Validation rules for also need to be updated to allow amp-video-ima as parent. Rules live in validator-main.protoascii

This means data-src no longer needs to be required either.

@shawnbuso
Copy link
Contributor

Taking a look at this one and I've got a quick question - do I have access to the amp-ima-video element in imaVideo.js? If I only have access to it in amp-ima-video.js, when is the earliest that I can send a message to the code in imaVideo.js to let it know what the potential sources are?

@aghassemi
Copy link
Contributor Author

aghassemi commented Jun 6, 2017

@shawnbuso adding/changing <source> later could be problematic ( see comment #9085 (comment) ) so I recommend against doing it with a postMessage.

We could scan the sources in amp-ima-video's buildCallback and serialize and put them as an attribute on the element, then when you create the 3P iframe, it would have access to that attribute same way it currently accesses the other ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants