Iot SDK 4.0.0
|
会话中的事件处理函数集合 更多...
#include <jrtc.h>
成员变量 | |
int(* | on_user_joined )(struct jrtc_t *jc, char uid[64], unsigned role, unsigned status) |
用户的加入事件. | |
int(* | on_user_changed )(struct jrtc_t *jc, char uid[64], int index, unsigned role, unsigned status) |
用户的更新事件. | |
void(* | on_user_offline )(struct jrtc_t *jc, char uid[64], int index, enum jrtc_error reason) |
用户的离线事件. | |
void(* | on_user_message )(struct jrtc_t *jc, char uid[64], int index, struct jrtc_slice_t msg[], unsigned num) |
用户的文本消息. | |
void(* | on_video_changed )(struct jrtc_t *jc, char vid[64], int index) |
收到视频首帧事件. | |
void(* | on_share_changed )(struct jrtc_t *jc, char uid[64], int index) |
共享者的改变事件 会话内全局只有一个共享屏幕, 被所有用户抢占使用. | |
void(* | on_audio_volume )(struct jrtc_t *jc, unsigned num, unsigned char index_volume[][2]) |
已索引成员的音量变化. | |
void(* | on_user_netstate )(struct jrtc_t *jc, unsigned num, unsigned char index_netstate[][2]) |
已索引成员的网络状态. | |
int(* on_user_joined) (struct jrtc_t *jc, char uid[64], unsigned role, unsigned status) |
int(* on_user_changed) (struct jrtc_t *jc, char uid[64], int index, unsigned role, unsigned status) |
void(* on_user_offline) (struct jrtc_t *jc, char uid[64], int index, enum jrtc_error reason) |
void(* on_user_message) (struct jrtc_t *jc, char uid[64], int index, struct jrtc_slice_t msg[], unsigned num) |
void(* on_video_changed) (struct jrtc_t *jc, char vid[64], int index) |
void(* on_share_changed) (struct jrtc_t *jc, char uid[64], int index) |
void(* on_audio_volume) (struct jrtc_t *jc, unsigned num, unsigned char index_volume[][2]) |
已索引成员的音量变化.
首次收到音频数据时也上报该事件, 且num=0,index_volume=NULL 其他情况下需要定时主动调用jrtc_request_volume
请求才有, 且只上报绑定过索引值的用户音量
[in] | num | 后续的音量个数 |
[in] | index_volume | 索引与音量的数组,音量范围[0,100] |
void(* on_user_netstate) (struct jrtc_t *jc, unsigned num, unsigned char index_netstate[][2]) |
已索引成员的网络状态.
需要定时主动调用jrtc_request_netstate
请求才有, 且只上报绑定过索引值的用户网络状态 网络状态范围[0,5], 0是未知, 1是最差, 5是最好 定义为只影响本地接收质量的状态:
[in] | num | 后续的状态个数 |
[in] | index_netstate | 索引与网络状态的数组, |