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: Added support for track child elements. #9827
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validator changes look good.
const sources = JSON.parse(data.sources); | ||
sources.forEach(source => { | ||
videoPlayer.appendChild(htmlToElement(source)); | ||
if (data.childElements) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet repurposing! 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love me some reusable code :D
// Save the first source and first track to preconnect. | ||
if (child.tagName == 'SOURCE' && !this.preconnectSource_) { | ||
this.preconnectSource_ = child.src; | ||
} else if (child.tagName == 'TRACK' && !this.preconnectTrack_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please update the .md
file to reflect that track
and source
children are supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, done.
These validator changes should be live everywhere within an hour. |
track
children for CC #8836