简体中文

音视频接口

TK_start

  • 功能描述:
  • 开启AV通道。

接口定义

export const TK_start: (uid: string, channel: number, password: string, account: string) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道号,一般为0
passwordstring设备密码
accountstring设备用户名

回调说明

暂无

返回码

暂无

代码示例

camera.TK_start: (uid, channel, password, account)

TK_start2

  • 功能描述:
  • 开启AV通道(支持authType和securityMode设定)。

接口定义

export const TK_start2: (uid: string, channel: number, password: string, account: string, authType: TKAuthType, securityMode: TKSecurityMode) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道号
passwordstring设备密码
accountstring设备用户名
authType
设备验证码类型
securityMode
加密模式

回调说明

暂无

返回码

暂无

代码示例

camera.TK_start2: (uid, channel, password, account, TKAuthType.Password, TKSecurityMode.AUTO)

TK_stop

  • 功能描述:
  • 关闭AV通道。

接口定义

export const TK_stop: (uid: string, channel: number) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道号

回调说明

暂无

返回码

暂无

代码示例

camera.TK_stop: (uid, channel)

TK_startShow

  • 功能描述:
  • 开始接收、解码并显示画面。

接口定义

export const TK_startShow: (uid: string, channel: number, xids: string[]) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道
xidsarray指定XComponent IDs

回调说明

暂无

返回码

暂无

代码示例

camera.TK_startShow: (uid, channel, ["window1"])

TK_startShow2

  • 功能描述:
  • 开始接收、解码并显示画面。

接口定义

export const TK_startShow2: (uid: string, channel: number, xids: string[], isDecodeAndRender: boolean, isSWDecode: boolean, isDropFrame: boolean, renderType: RENDER_TYPE, isSendComond: boolean) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道
xidsarray指定XComponent IDs
isDecodeAndRenderboolean是否解码并渲染
isSWDecodeboolean是否软解
isDropFrameboolean是否丢P帧
renderType
输出数据类型
isSendCommandboolean是否发送指令1FF/2FF

回调说明

暂无

返回码

暂无

代码示例

camera.TK_startShow2: (uid, channel, ["window1"], true, false, false, OUTPUT_EMPTY, true)

TK_stopShow

  • 功能描述:
  • 停止接收、解码和画面显示。

接口定义

export const TK_stopShow: (uid: string, channel: number) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道

回调说明

暂无

返回码

暂无

代码示例

camera.TK_stopShow: (uid, channel)

TK_startSoundToPhone

  • 功能描述:
  • 开始接收、解码并监听设备声音。

接口定义

export const TK_startSoundToPhone: (uid: string, channel: number) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道

回调说明

暂无

返回码

暂无

代码示例

camera.TK_startSoundToPhone: (uid, channel)

TK_stopSoundToPhone

  • 功能描述:
  • 停止接收、解码和监听设备声音。

接口定义

export const TK_stopSoundToPhone: (uid: string, channel: number) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道

回调说明

暂无

返回码

暂无

代码示例

camera.TK_stopSoundToPhone: (uid, channel)

TK_startSoundToDevice

  • 功能描述:
  • 开始对讲(发送声音到设备)。

接口定义

export const TK_startSoundToDevice: (uid: string, channel: number, isResend: boolean) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道
isResendboolean是否开启重传

回调说明

暂无

返回码

暂无

代码示例

camera.TK_startSoundToDevice: (uid, channel, true)

TK_stopSoundToDevice

  • 功能描述:
  • 停止对讲。

接口定义

export const TK_stopSoundToDevice: (uid: string, channel: number) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道

回调说明

暂无

返回码

暂无

代码示例

camera.TK_stopSoundToDevice: (uid, channel)

TK_startVideoToDevice

  • 功能描述:
  • 开始建立视频发送通道(发送视频到设备)。

接口定义

export const TK_startVideoToDevice: (uid: string, channel: number, isResend: boolean) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道
isResendboolean是否开启重传

回调说明

暂无

返回码

暂无

代码示例

camera.TK_startVideoToDevice: (uid, channel, true)

TK_stopVideoToDevice

  • 功能描述:
  • 停止发送视频并关闭通道。

接口定义

export const TK_stopVideoToDevice: (uid: string, channel: number) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道

回调说明

暂无

返回码

暂无

代码示例

camera.TK_stopVideoToDevice: (uid, channel)

TK_sendVideoToDevice

  • 功能描述:
  • 发送视频帧。

接口定义

export const TK_sendVideoToDevice: (uid: string, channel: number, buff: Uint8Array, buffer_size: number, pts: number, codec_id: number, isKeyFrame: boolean) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道
buffUint8Array视频帧数据
buffer_sizenumber数据长度
ptsnumber视频帧对应时间戳
codec_idnumber帧数据编码格式
isKeyFrameboolean是否是关键帧

回调说明

暂无

返回码

暂无

代码示例

camera.TK_sendVideoToDevice: (uid, channel, buff, buff_size, timestamp, 0x4E, true)

TK_setHWDecodingAbility

  • 功能描述:
  • 设置指定通道的解码方式。

接口定义

export const TK_setHWDecodingAbility: (uid: string, channel: number, isHWDecode: boolean) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道
isHWDecodeboolean是否硬解码

回调说明

暂无

返回码

暂无

代码示例

camera.TK_setHWDecodingAbility: (uid, channel, true)

TK_snapshot

  • 功能描述:
  • 截取图片。

接口定义

export const TK_snapshot: (uid: string, channel: number, filepath: string, cb: (arg: snapshotState) => void) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道
filepathstring沙盒图片路径
cb
截图结果回调

回调说明

暂无

返回码

暂无

代码示例

camera.TK_snapshot: (uid, channel, filepath,(state: snapshotState) => {})

TK_startRecording

  • 功能描述:
  • 指定通道开始本地录像。

接口定义

export const TK_startRecording: (uid: string, channel: number, filepath: string, isListening: boolean) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道
filepathstring沙盒图片路径
isListeningboolean是否播放监听声音

回调说明

暂无

返回码

暂无

代码示例

camera.TK_startRecording: (uid, channel, filepath, false)

TK_stopRecording

  • 功能描述:
  • 停止录像。

接口定义

export const TK_stopRecording: (uid: string, channel: number) => number;

参数说明

参数类型说明
uidstring设备uid
channelnumberav通道

回调说明

暂无

返回码

暂无

代码示例

camera.TK_stopRecording: (uid, channel)

即刻开启您的物联网之旅

联系解决方案专家
Kalay App
资讯安全白皮书
全球专利布局
解决方案
新闻动态
公司动态
行业资讯
媒体报道
永续发展
经营者的话
社会参与
环境永续
公司治理

+86 755 27702549

7×24小时服务热线

法律声明 隐私权条款

关注“TUTK”

TUTK服务尽在掌握

© 2022 物联智慧科技(深圳)有限公司版权所有粤ICP备14023641号
在线咨询
扫一扫

TUTK服务尽在掌握

全国免费服务热线
+86 755 27702549

返回顶部