Video360Viewer video-viewer

适用于Video360查看器的JavaScript API参考。

Video360Viewer([config])

构造函数,创建新的HTML5 Video360查看器实例。

参数 section-4fb77a645fdd45b3aaa5079c31e3bb05

config

{object} 可选JSON配置对象,允许所有查看器设置传递到构造函数,以避免调用单个setter方法。 包含以下属性:

  • containerId - {String} DOM容器的ID(通常为 DIV ),查看器将插入到其中。 在调用此方法时,无需创建容器元素。 但是,在以下情况下必须存在容器: init() 运行。

    必需.

  • 参数 - {Object} 具有查看器配置参数的JSON对象,其中属性名称为查看器特定的配置选项或SDK修饰符,该属性的值为相应的设置值。

    必需.

  • 处理程序 - {Object} 具有查看器事件回调的JSON对象,其中属性名称是受支持的查看器事件的名称,属性值是对相应回调的JavaScript函数引用。

    可选.

    参见 事件回调以了解有关查看器事件的更多信息。

  • localizedText - {Object} 包含本地化数据的JSON对象。 可选.

    参见 用户界面元素的本地化了解更多信息。

    另请参阅 Viewer 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