amp-jwplayer
Introduction
Use the amp-jwplayer
extension to embed jwplayer videos in your AMP HTML files.
Setup
Import the amp-jwplayer
component in the header.
<script async custom-element="amp-jwplayer" src="https://cdn.ampproject.org/v0/amp-jwplayer-0.1.js"></script>
Basic usage
Embed jwplayer videos via the data-media-id
and data-player-id
attributes. We recommend using the responsive layout for videos.
<amp-jwplayer data-media-id="BZ6tc0gy" data-player-id="uoIbMPm3" layout="responsive" width="16" height="9">
</amp-jwplayer>
Playlist support
It's also possible to embed a jwplayer video playlist via the data-playlist-id
and data-player-id
attributes.
<amp-jwplayer data-playlist-id="482jsTAr" data-player-id="uoIbMPm3" layout="responsive" width="16" height="9">
</amp-jwplayer>
If the explanations on this page don't cover all of your questions feel free to reach out to other AMP users to discuss your exact use case.
Go to Stack Overflow An unexplained feature?The AMP project strongly encourages your participation and contributions! We hope you'll become an ongoing participant in our open source community but we also welcome one-off contributions for the issues you're particularly passionate about.
Edit sample on GitHub-
Written by @jmadler