Class: HlsPlugin

HlsPlugin()

Hls视频流插件,可播放m3u8格式的视频流

Constructor

new HlsPlugin()

Methods

createVideoMesh(option)

创建一个视频对象
Parameters:
Name Type Description
option *
id:视频对象id Number
src:视频源url
position:视频mesh位置.THREE.Vecotr3 默认值(0,0,0)
width:视频对象宽度 默认值 16
height:视频对象高带 默认值 9
lookAtCamera:是否始终面向camera 默认值false

getVedio(id)

返回视频对象,方便开发者处理,譬如增加一个mesh旋转之类的
Parameters:
Name Type Description
id Number 视频对象id

pauseOrReplay(id)

暂停/继续播放的切换操作
Parameters:
Name Type Description
id Number 视频对象id

removeVedio(id)

删除视频对象
Parameters:
Name Type Description
id * 对象ID

rotateYClockwise(angle)

绕Y轴顺时针旋转n度
Parameters:
Name Type Description
angle * 角度

rotateYCounterclockwise(angle)

绕Y轴逆时针旋转n度
Parameters:
Name Type Description
angle * 角度