Video

.Videos. Video

视频对象,用于构造单个视频对象

Constructor

new Glodon.Bimface.Plugins.Videos.Video(videoConfig)

Parameters:
Name Type Description
videoConfig Glodon.Bimface.Plugins.Videos.VideoConfig

视频对象的配置项

Methods

getCamera()

获取投射视频的相机参数设置

Returns:
Type Description
Object

投射视频的相机参数设置,包括相机位置、方向、水平视角范围、垂直视角范围。

getId()

获取视频对象ID

Returns:
Type Description
String

id 视频对象ID

getPlane()

获取平面投射的参数设置

Returns:
Type Description
Object

平面投射设置,包含投射距离与正反面投射设置。

getSrc()

获取视频路径

Returns:
Type Description
String

路径

loop(isEnabled)

是否开启循环播放

Parameters:
Name Type Description
isEnabled Boolean

是否循环播放视频,默认为"true"

loop(isEnabled)

是否开启循环播放

Parameters:
Name Type Description
isEnabled Boolean

是否循环播放视频,默认为"true"

mute(isEnabled)

视频静音

Parameters:
Name Type Description
isEnabled Boolean

是否将视频静音,默认为"false"

mute(isEnabled)

视频静音

Parameters:
Name Type Description
isEnabled Boolean

是否将视频静音,默认为"false"

pause()

暂停视频

pause()

暂停视频

play()

播放视频

play()

播放视频

setCamera(camera)

设置投射视频的相机参数

Parameters:
Name Type Description
camera Object

投射视频的相机参数设置,包括相机位置、方向、水平视角范围、垂直视角范围。{"position": {x: 6000,y:-3600,z:500},"direction" :{x: 0.48, y: -0.64, z: -0.6},"horizontalFov":Math.PI/2,"verticalFov":Math.PI/3}。其中,位置为世界坐标系,视角范围单位为弧度。

setPlane(plane)

设置平面投射的参数

Parameters:
Name Type Description
plane Object

平面投射设置,包含投射距离与正反面投射设置,例{"distance":10,“side”:0}。其中,距离单位在GIS场景下为m,3D场景下为mm。side可取值为0:单面正面;1:单面反面;2:双面,默认值为0。

setPlane(plane)

设置平面投射的参数

Parameters:
Name Type Description
plane Object

平面投射设置,包含投射距离与正反面投射设置,例{"distance":10,“side”:0}。其中,距离单位在GIS场景下为m,3D场景下为mm。side可取值为0:单面正面;1:单面反面;2:双面,默认值为0。

setSrc(src)

设置视频路径

Parameters:
Name Type Description
src String

视频路径

update()

视频更新()