Search code examples
amp-html

How to create my own custom-element with Google AMP?


I've a custom video player, and I'd like to create a "custom-element" to invoke the layout and functionality using Google AMP. I've saw documentation about how to use the current components that AMP HTML library provides. Any info about how to create my own component will be really appreciated.

Something like:

<amp-my-own-video-player
    layout="responsive"
    width="480" height="270">
</amp-my-own-video-player>

Solution

  • According to a Developer Advocate at Google in this SO thread, you can't create your own custom element. The only way you'll be able to do it is to contribute or be a member of the AMP HTML team.