amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Change video in amp-youtube

Open joedevgee opened this issue 10 years ago • 7 comments

Since AMP does not allow Javascript, How can I change the video-id of a existing amp-youtube component?

joedevgee avatar Aug 12 '16 13:08 joedevgee

/to @ericlindley-g

dvoytenko avatar Aug 12 '16 15:08 dvoytenko

@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 avatar Aug 12 '16 15:08 rudygalfi

@rudygalfi Yes it is user initiated. For example, a list of related videos under the existing amp-youtube component.

joedevgee avatar Aug 12 '16 15:08 joedevgee

Thanks @devilbags—there's currently no method to do this in AMP, but we can investigate options for this as a feature request.

ericlindley-g avatar Sep 01 '16 18:09 ericlindley-g

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?

ericlindley-g avatar Feb 12 '17 01:02 ericlindley-g

Here's an example of changing amp-youtube's data-videoid attribute with bind. @ericlindley-g can we close this issue?

kmh287 avatar May 09 '17 20:05 kmh287

Yep—thanks @kmh287 !

ericlindley-g avatar May 09 '17 21:05 ericlindley-g