Video360Viewer video-viewer

Video360 Viewer的JavaScript API參考。

Video360Viewer([config])

建構函式,建立新的HTML5 Video360 Viewer例項。

參數 section-4fb77a645fdd45b3aaa5079c31e3bb05

設定

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

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

    必要.

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

    必要.

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

    選擇性.

    如需檢視器事件的詳細資訊,請參閱事件回呼

  • localizedTexts - {Object} JSON物件包含本地化資料。 選擇性.

    如需詳細資訊,請參閱使用者介面元素的本地化。

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

傳回 section-1d3cf85bc7cc4dfe9670e038d02b9101

無。

範例 section-9e9332aa86b74a5fb321375c03fdc5b3

var video360Viewer = new s7viewers.Video360Viewer({
 "containerId":"s7viewer",
"params":{
 "asset":"Viewers/space_station_360-AVS",
 "serverurl":"https://s7d9.scene7.com/is/image/",
 "videoserverurl":"https://s7d9.scene7.com/is/content/"
},
"handlers":{
 "initComplete":function() {
  console.log("init complete");
}
},
"localizedTexts":{
"en":{
"Video360Player.ERROR":"Your Browser does not support HTML5 Video tag or the video cannot be played."
},
"fr":{
"Video360Player.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