SmartCropVideoViewer smartcropvideoviewer

智能裁剪视频查看器的JavaScript API参考。

SmartCropVideoViewer([config])

构造函数;创建智能裁剪视频查看器实例。

参数 section-8bc3d1424c8444f193716fc8d9975765

config

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

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

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

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

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

  • localizedText - { 对象 } JSON对象和本地化数据。 可选.

    参见 Viewer SDK命名空间了解更多信息。

    请参阅 Viewer SDK用户指南 和示例,以了解有关对象内容的更多信息。 可选.

返回 section-1d3cf85bc7cc4dfe9670e038d02b9101

无。

示例 section-9e9332aa86b74a5fb321375c03fdc5b3

var smartCropVideoViewer = new s7viewers.SmartCropVideoViewer({
 "containerId":"s7viewer",
"params":{
 "asset":"Scene7SharedAssets/Glacier_Climber_MP4",
 "serverurl":"http://s7d1.scene7.com/is/image/",
 "videoserverurl":"http://s7d1.scene7.com/is/content/"
},
"handlers":{
 "initComplete":function() {
  console.log("init complete");
}
},
"localizedTexts":{
"en":{
"SmartCropVideoPlayer.ERROR":"Your Browser does not support HTML5 Video tag or the video cannot be played."
},
"fr":{
"SmartCropVideoPlayer.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