跳转至

对应文件 tkroommanager_c.h

createclient

  • 简要描述

    创建client指针

  • 函数原型

    int createclient(struct roomclient** client)

  • 方法示例

    1
    2
    struct roomclient* client = NULL;
    createclient(&client);
    

destroyclient

  • 简要描述

    销毁client

  • 函数原型

    int destroyclient(struct roomclient* client)

GetSdkVersion

初始化(init)

  • 简要描述

    init sdk 在获取client指针后,在使用SDK的时候首先首先调用init来初始化

  • 函数原型

    1
    int init(struct roomclient* client, const char* appKey, const char* jsonOptions = 0)
    
  • 参数

参数 说明
appKey 为企业authkey (企业注册时获得的 authkey)
jsonOptions KMULTILOCALSTREAM TKMAXRECONNECTCOUNT
  • 方法示例
    1
    2
    3
    4
    5
    struct roomclient* client = NULL;
    createclient(&client);
    char *appKey = "123456";
    char *jsonOptions = "{\"tk_ui_uniform_version\": 13, \"tk_getroomfile\": true}"; //需要符合json的字符串格式,为了能够解析
    init(client, appKey, jsonOptions)
    

getInterface

registerroomobserver

  • 简要描述

    设置 roommanager 回调

  • 函数原型

    1
    void registerroomobserver(struct roomclient* client, tkroomobserver observer)
    
  • 使用

    使用之前需要选获取SDK实例对象,并且调用init()初始化SDK

    1
    2
    3
    4
    5
    6
    7
    struct tkroomobserver observer;
    void roomjoined(struct roomclient *client)
    {
    //自己实现逻辑,需要观察的时间,都需要实现
    }
    observer.on_roomjoined = roomjoined
    registerroomobserver(client, observer);
    

registermediaobserver

  • 简要描述

    设置获取音视频数据回调代理

  • 函数原型

    1
    void registermediaobserver(struct roomclient* client, tkmediaobserver observer)
    
  • 使用

    registerroomobserver使用一样

© 2016-2023 北京拓课网络科技有限公司 版权所有  京ICP备17018423号-1 京公网安备11010502043461号