new Stream(attrs, options)
铼看视频流类
Parameters:
| Name | Type | Description |
|---|---|---|
attrs |
object | 属性, 创建视频时支持的属性有
|
options |
object | 设置 |
Methods
-
<static> findAll(callback)
-
获得所有视频
Parameters:
Name Type Description callbackLycamPlus.Callback~normal -
<static> findOneById(id, callback)
-
根据ID查询视频
Parameters:
Name Type Description idstring id
callbackLycamPlus.Callback~normal -
destroy(callback)
-
销毁视频,需要视频已被存储
Parameters:
Name Type Description callbackLycamPlus.Callback~simple -
getCity()
-
获得城市
Returns:
- Type
- string
-
getCountry()
-
获得国家
Returns:
- Type
- string
-
getEndLat()
-
获得结束视频的纬度坐标
Returns:
- Type
- float
-
getEndLon()
-
获得结束视频的经度坐标
Returns:
- Type
- float
-
getExtra(key)
-
根据key获得额外信息
Parameters:
Name Type Description keystring Returns:
- Type
- string | object | array
-
getExtras()
-
获得额外信息
Returns:
- Type
- LycamPlus.Stream.FIELDS.extraInfo | Object
-
getId()
-
获得视频ID
Returns:
- Type
- null | string
-
getPrivate()
-
获得是否公开
Returns:
- Type
- boolean
-
getStartLat()
-
获得开始视频的纬度坐标
Returns:
- Type
- float
-
getStartLon()
-
获得开始视频的经度坐标
Returns:
- Type
- float
-
getState()
-
获得省份
Returns:
- Type
- string
-
getThumbnailUrl()
-
获得视频封面
Returns:
- Type
- string
-
getTitle()
-
获得标题
Returns:
- Type
- string
-
pause(callback)
-
停止视频,需要视频已被存储
Parameters:
Name Type Description callbackLycamPlus.Callback~simple -
resume(callback)
-
继续视频,需要视频已被存储
Parameters:
Name Type Description callbackLycamPlus.Callback~simple -
save(callback)
-
存储该视频
Parameters:
Name Type Description callbackLycamPlus.Callback~simple -
setCity(city)
-
设置城市
Parameters:
Name Type Description citystring -
setCountry(country)
-
设置国家
Parameters:
Name Type Description countrystring -
setEndLat(endLat)
-
设置结束视频的纬度坐标
Parameters:
Name Type Description endLatfloat 结束视频的纬度坐标
-
setEndLon(endLon)
-
设置结束视频的经度坐标
Parameters:
Name Type Description endLonfloat 结束视频的经度坐标
-
setExtra(key, value)
-
设置额外信息
Parameters:
Name Type Description keystring valuestring | object | array -
setPrivate(privated)
-
设置是否公开
Parameters:
Name Type Description privatedboolean -
setStartLat(startLat)
-
设置开始视频的纬度坐标
Parameters:
Name Type Description startLatfloat 开始视频的纬度坐标
-
setStartLon(startLon)
-
设置开始视频的经度坐标
Parameters:
Name Type Description startLonfloat 开始视频的经度坐标
-
setState(state)
-
设置省份
Parameters:
Name Type Description statestring -
setThumbnailUrl(thumbnailUrl)
-
设置视频封面
Parameters:
Name Type Description thumbnailUrlstring -
setTitle(title)
-
设置标题
Parameters:
Name Type Description titlestring -
start(callback)
-
开始一个视频,若该视频尚未被存储,那么会被自动存储
Parameters:
Name Type Description callbackLycamPlus.Callback~simple -
stop(callback)
-
停止视频,需要视频已被存储
Parameters:
Name Type Description callbackLycamPlus.Callback~simple