Change video in amp-youtube
Since AMP does not allow Javascript, How can I change the video-id of a existing amp-youtube component?
/to @ericlindley-g
@devilbags What use case do you have in mind for changing the video ID? For example, is it a user-initiated action like clicking to toggle between two videos?
@rudygalfi Yes it is user initiated. For example, a list of related videos under the existing amp-youtube component.
Thanks @devilbags—there's currently no method to do this in AMP, but we can investigate options for this as a feature request.
Might be a good fit for amp-bind. @devilbags, can you point to an example web page that demonstrates the feature you'd like to have in AMP?
Here's an example of changing amp-youtube's data-videoid attribute with bind. @ericlindley-g can we close this issue?
Yep—thanks @kmh287 !