docs/api/dom/univideoelement.md
video元素对象
| Web | 微信小程序 | Android | iOS | HarmonyOS |
|---|---|---|---|---|
| 4.0 | x | - | - | - |
graph LR
UniVideoElement -- Extends --> UniElement
style UniElement color:#42b983
click UniElement "https://doc.dcloud.net.cn/uni-app-x/api/dom/unielement.html"
播放
| Web | 微信小程序 | Android | iOS | HarmonyOS |
|---|---|---|---|---|
| 4.0 | x | - | - | - |
暂停
| Web | 微信小程序 | Android | iOS | HarmonyOS |
|---|---|---|---|---|
| 4.0 | x | - | - | - |
跳转到指定位置
| Web | 微信小程序 | Android | iOS | HarmonyOS |
|---|---|---|---|---|
| 4.0 | x | - | - | - |
| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |
|---|---|---|---|---|---|
| position | number | 是 | - | Web: -; 微信小程序: x; Android: -; iOS: -; HarmonyOS: - | 跳转到指定位置(秒) |
停止视频
| Web | 微信小程序 | Android | iOS | HarmonyOS |
|---|---|---|---|---|
| 4.0 | x | - | - | - |
发送弹幕
| Web | 微信小程序 | Android | iOS | HarmonyOS |
|---|---|---|---|---|
| 4.0 | x | - | - | - |
| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |
|---|---|---|---|---|---|
| danmu | Danmu | 是 | - | Web: -; 微信小程序: x; Android: -; iOS: -; HarmonyOS: - | 弹幕数据 |
| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |
|---|---|---|---|---|---|
| text | string | 否 | - | Web: -; 微信小程序: x; Android: -; iOS: -; HarmonyOS: - | 弹幕文字 |
| color | string | 否 | - | Web: -; 微信小程序: x; Android: -; iOS: -; HarmonyOS: - | 弹幕颜色 |
| time | number | 否 | - | Web: -; 微信小程序: x; Android: -; iOS: -; HarmonyOS: - | 显示时刻 |
设置倍速播放
| Web | 微信小程序 | Android | iOS | HarmonyOS |
|---|---|---|---|---|
| 4.0 | x | - | - | - |
| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |
|---|---|---|---|---|---|
| rate | number | 是 | - | Web: -; 微信小程序: x; Android: -; iOS: -; HarmonyOS: - | 支持倍率 0.5/0.8/1.0/1.25/1.5 |
进入全屏
| Web | 微信小程序 | Android | iOS | HarmonyOS |
|---|---|---|---|---|
| 4.0 | x | - | - | - |
| 名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |
|---|---|---|---|---|---|
| direction | RequestFullScreenOptions | 否 | - | Web: -; 微信小程序: x; Android: -; iOS: -; HarmonyOS: - | 0|正常竖向, 90|屏幕逆时针90度, -90|屏幕顺时针90度 |
| 名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |
|---|---|---|---|---|---|
| direction | number | 否 | - | Web: x; 微信小程序: x; Android: 3.9.0; iOS: 4.11; HarmonyOS: - | direction |
| 合法值 | 兼容性 | 描述 |
|---|---|---|
| 0 | Web: -; 微信小程序: x; Android: -; iOS: -; HarmonyOS: - | 正常竖向 |
| 90 | Web: -; 微信小程序: x; Android: -; iOS: -; HarmonyOS: - | 屏幕逆时针90度 |
| -90 | Web: -; 微信小程序: x; Android: -; iOS: -; HarmonyOS: - | 屏幕顺时针90度 |
退出全屏
| Web | 微信小程序 | Android | iOS | HarmonyOS |
|---|---|---|---|---|
| 4.0 | x | - | - | - |