AMP
  • 網站

amp-jwplayer

簡介

使用 <a href="/documentation/components/amp-jwplayer/"><code>amp-jwplayer</code></a> 擴充功能,將 jwplayer 影片嵌入您的 AMP HTML 檔案中。

設定

在標頭中匯入 <code>amp-jwplayer</code> 元件。

<script async custom-element="amp-jwplayer" src="https://cdn.ampproject.org/v0/amp-jwplayer-0.1.js"></script>

基本用法

透過 <code>data-media-id</code> 和 <code>data-player-id</code> 屬性嵌入 jwplayer 影片。我們建議影片使用回應式版面配置。

<amp-jwplayer data-media-id="BZ6tc0gy" data-player-id="uoIbMPm3" layout="responsive" width="16" height="9">
</amp-jwplayer>

播放清單支援

也可以透過 <code>data-playlist-id</code> 和 <code>data-player-id</code> 屬性嵌入 jwplayer 影片播放清單。

<amp-jwplayer data-playlist-id="482jsTAr" data-player-id="uoIbMPm3" layout="responsive" width="16" height="9">
</amp-jwplayer>
需要更多說明嗎?

如果此頁面上的說明未能涵蓋您的所有問題,請隨時聯繫其他 AMP 使用者,討論您的確切使用案例。

前往 Stack Overflow
未說明的特色功能?

AMP 專案非常鼓勵您的參與和貢獻!我們希望您能成為我們開源社群的長期參與者,但我們也歡迎您針對您特別關注的問題做出一次性的貢獻。

在 GitHub 上編輯範例