From 205c894eb077d24eaaf3ac8faac27d67ccd760f8 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Thu, 2 Apr 2020 10:31:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0mk=5Fmedia=5Fset=5Fon=5Fseek?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/include/mk_media.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/api/include/mk_media.h b/api/include/mk_media.h index 1ec00bd5..ef90ffe9 100755 --- a/api/include/mk_media.h +++ b/api/include/mk_media.h @@ -148,6 +148,22 @@ typedef void(API_CALL *on_mk_media_close)(void *user_data); */ API_EXPORT void API_CALL mk_media_set_on_close(mk_media ctx, on_mk_media_close cb, void *user_data); +/** + * 收到客户端的seek请求时触发该回调 + * @param user_data 用户数据指针,通过mk_media_set_on_seek设置 + * @param stamp_ms seek至的时间轴位置,单位毫秒 + * @return 1代表将处理seek请求,0代表忽略该请求 + */ +typedef int(API_CALL *on_mk_media_seek)(void *user_data,uint32_t stamp_ms); + +/** + * 监听播放器seek请求事件 + * @param ctx 对象指针 + * @param cb 回调指针 + * @param user_data 用户数据指针 + */ +API_EXPORT void API_CALL mk_media_set_on_seek(mk_media ctx, on_mk_media_seek cb, void *user_data); + /** * 获取总的观看人数 * @param ctx 对象指针