InteractiveVideoViewer interactivevideoviewer

互動式視訊檢視器的JavaScript API參考。

InteractiveVideoViewer([config])

建構函式,建立互動式視訊檢視器例項。

參數 section-4fb77a645fdd45b3aaa5079c31e3bb05

設定

{object} 選用的JSON設定物件,可讓所有檢視器設定傳遞至建構函式,以避免呼叫個別setter方法。 包含以下屬性:

  • containerId - {String} DOM容器的ID (通常是 DIV ),檢視器會插入其中。 呼叫此方法時,不需要建立容器元素。 不過,容器必須存在於 init() 執行前填入。

    必要.

  • 引數 - {Object} 具有檢視器組態引數的JSON物件,其中屬性名稱為檢視器特定的組態選項或SDK修飾元,且該屬性的值為對應的設定值。

    必要.

  • 處理常式 - {Object} 具有檢視器事件回呼的JSON物件,其中屬性名稱是支援的檢視器事件的名稱,屬性值是對適當回呼的JavaScript函式參考。

    選擇性.

    另請參閱 事件回呼以取得檢視器事件的詳細資訊。

  • localizedText - {Object} 含有本地化資料的JSON物件。 選擇性.

    另請參閱 使用者介面元素的本地化以取得詳細資訊。

    另請參閱 檢視器SDK使用手冊 和範例,以取得物件內容的詳細資訊。

傳回 section-1d3cf85bc7cc4dfe9670e038d02b9101

無。

範例 section-9e9332aa86b74a5fb321375c03fdc5b3

var interactiveVideoViewer = new s7viewers.InteractiveVideoViewer({
 "containerId":"s7viewer",
"params":{
 "asset":"/content/dam/mac/aodmarketingna/dm-viewers-content/video/Glacier.mp4",
"config":"/etc/dam/presets/viewer/Shoppable_Video_Dark",
 "serverurl":"https://aodmarketingna.assetsadobe.com/is/image/",
 "videoserverurl":"https://gateway-na.assetsadobe.com/DMGateway/public/aodmarketingna",
 "contenturl":"https://aodmarketingna.assetsadobe.com/",
"interactivedata":"is/content/content/dam/mac/aodmarketingna/_VTT/dm-viewers-content/video/Glacier.mp4.svideo.vtt"
},
"handlers":{
 "initComplete":function() {
  console.log("init complete");
}
},
"localizedTexts":{
"en":{
"VideoPlayer.ERROR":"Your Browser does not support HTML5 Video tag or the video cannot be played."
},
"fr":{
"VideoPlayer.ERROR":"Votre navigateur ne prend pas en charge la vidéo HTML5 tag ou la vidéo ne peuvent pas être lus."
},
defaultLocale:"en"
}
});
recommendation-more-help
b7426f53-aad9-4c00-83fc-664f30f681e8