更新记录
1.0.0(2024-10-19)
初始化版本发布
平台兼容性
Vue2 | Vue3 |
---|---|
√ | √ |
App | 快应用 | 微信小程序 | 支付宝小程序 | 百度小程序 | 字节小程序 | QQ小程序 |
---|---|---|---|---|---|---|
HBuilderX 3.7.0,Android:4.4,iOS:11,HarmonyNext:不确定 | × | × | × | × | × | × |
钉钉小程序 | 快手小程序 | 飞书小程序 | 京东小程序 |
---|---|---|---|
× | × | × | × |
H5-Safari | Android Browser | 微信浏览器(Android) | QQ浏览器(Android) | Chrome | IE | Edge | Firefox | PC-Safari |
---|---|---|---|---|---|---|---|---|
× | × | × | × | × | × | × | × | × |
概述
XF-timeLineUTS封装了在iOS和安卓上的时间刻度功能,可用于监控视频回放播放。
模块调用
<time-line ref="timeLine" @time="onTime" :style="{width:widthNum+'rpx',height:heightNum+'rpx'}">
</time-line>
模块接口
addTimeList
设置时间刻度区间列表。
uni-app项目中(nvue)调用示例:
const list = ["01:00:12-02:00:01",
"02:00:12-02:50:01",
"03:00:12-03:01:01",
"04:00:12-04:50:01",
"05:00:12-05:40:01",
"06:00:12-06:20:01",
"07:00:12-07:50:01",
"08:00:12-09:00:01",
"12:00:12-14:00:01",
"14:10:12-14:11:01",
"14:20:12-14:50:01",
"15:00:12-16:00:01",
"16:00:12-18:00:01",
"18:10:12-19:00:01",
"20:00:12-22:00:01",
"22:00:12-23:50:01"];
this.$refs["timeLine"].addTimeList(list);
uni-app x项目(uvue)中调用示例:
const list = ["01:00:12-02:00:01",
"02:00:12-02:50:01",
"03:00:12-03:01:01",
"04:00:12-04:50:01",
"05:00:12-05:40:01",
"06:00:12-06:20:01",
"07:00:12-07:50:01",
"08:00:12-09:00:01",
"12:00:12-14:00:01",
"14:10:12-14:11:01",
"14:20:12-14:50:01",
"15:00:12-16:00:01",
"16:00:12-18:00:01",
"18:10:12-19:00:01",
"20:00:12-22:00:01",
"22:00:12-23:50:01"];
// #ifdef APP-ANDROID
import { TimeLineElement } from 'uts.sdk.modules.XFTimeLineUTS';
// #endif
// #ifdef APP-ANDROID
(this.$refs["timeLine"] as TimeLineElement).addTimeList(list);
// #endif
// #ifdef APP-IOS
this.$refs["timeLine"].addTimeList(list);
// #endif
可用性
iOS、Android系统
可提供的1.0.0及更高版本
setTimeSec
跳转到指定的刻度
uni-app项目中(nvue)调用示例:
this.$refs["timeLine"].setTimeSec(44883);
uni-app x项目(uvue)中调用示例:
// #ifdef APP-ANDROID
import { TimeLineElement } from 'uts.sdk.modules.XFTimeLineUTS';
// #endif
// #ifdef APP-ANDROID
(this.$refs["timeLine"] as TimeLineElement).setTimeSec(44883);
// #endif
// #ifdef APP-IOS
this.$refs["timeLine"].setTimeSec(44883);
// #endif
可用性
iOS、Android系统
可提供的1.0.0及更高版本