Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
af535b63
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
5995
Star
90
Fork
162
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
af535b63
编写于
1月 24, 2024
作者:
DCloud-yinjiacheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新video示例
上级
24299c05
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
12 addition
and
12 deletion
+12
-12
pages/component/video/video-format.uvue
pages/component/video/video-format.uvue
+2
-2
pages/component/video/video.uvue
pages/component/video/video.uvue
+10
-10
未找到文件。
pages/component/video/video-format.uvue
浏览文件 @
af535b63
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<view v-for="(item,index) in supportFormats" :key="index">
<view v-for="(item,index) in supportFormats" :key="index">
<text class="uni-subtitle-text">{{item.format}}</text>
<text class="uni-subtitle-text">{{item.format}}</text>
<video :id="'video-' + item.format" class="video" :src="item.src" :controls="true" :direction="-90"
<video :id="'video-' + item.format" class="video" :src="item.src" :controls="true" :direction="-90"
@error="onError(item.format, $event as VideoErrorEvent)"></video>
@error="onError(item.format, $event as
Uni
VideoErrorEvent)"></video>
</view>
</view>
<view class="uni-title">
<view class="uni-title">
<text class="uni-title-text">暂不支持的格式</text>
<text class="uni-title-text">暂不支持的格式</text>
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
}
}
},
},
methods: {
methods: {
onError: function (format : string, e : VideoErrorEvent) {
onError: function (format : string, e :
Uni
VideoErrorEvent) {
console.log(format + ":" + JSON.stringify(e));
console.log(format + ":" + JSON.stringify(e));
if (format != "错误路径") {
if (format != "错误路径") {
this.isError = true;
this.isError = true;
...
...
pages/component/video/video.uvue
浏览文件 @
af535b63
...
@@ -373,39 +373,39 @@
...
@@ -373,39 +373,39 @@
console.log("header -> " + this.header)
console.log("header -> " + this.header)
},
},
// 事件
// 事件
onPlay: function (res : Event) {
onPlay: function (res :
Uni
Event) {
console.log(res.type);
console.log(res.type);
this.isPlaying = true;
this.isPlaying = true;
this.isPause = false;
this.isPause = false;
},
},
onPause: function (res : Event) {
onPause: function (res :
Uni
Event) {
console.log(res.type);
console.log(res.type);
this.isPlaying = false;
this.isPlaying = false;
this.isPause = true;
this.isPause = true;
},
},
onEnded: function (res : Event) {
onEnded: function (res :
Uni
Event) {
console.log(res.type);
console.log(res.type);
},
},
onTimeUpdate: function (res : VideoTimeUpdateEvent) {
onTimeUpdate: function (res :
Uni
VideoTimeUpdateEvent) {
console.log(res.type + " -> " + JSON.stringify(res.detail));
console.log(res.type + " -> " + JSON.stringify(res.detail));
},
},
onFullScreenChange: function (res : VideoFullScreenChangeEvent) {
onFullScreenChange: function (res :
Uni
VideoFullScreenChangeEvent) {
console.log(res.type + " -> " + JSON.stringify(res.detail));
console.log(res.type + " -> " + JSON.stringify(res.detail));
this.isFullScreen = !this.isFullScreen;
this.isFullScreen = !this.isFullScreen;
},
},
onWaiting: function (res : Event) {
onWaiting: function (res :
Uni
Event) {
console.log(res.type);
console.log(res.type);
},
},
onError: function (res : VideoErrorEvent) {
onError: function (res :
Uni
VideoErrorEvent) {
console.log(res.type + " -> " + JSON.stringify(res.detail));
console.log(res.type + " -> " + JSON.stringify(res.detail));
},
},
onProgress: function (res : VideoProgressEvent) {
onProgress: function (res :
Uni
VideoProgressEvent) {
console.log(res.type + " -> " + JSON.stringify(res.detail));
console.log(res.type + " -> " + JSON.stringify(res.detail));
},
},
onFullScreenClick: function (res : VideoFullScreenClickEvent) {
onFullScreenClick: function (res :
Uni
VideoFullScreenClickEvent) {
console.log(res.type + " -> " + JSON.stringify(res.detail));
console.log(res.type + " -> " + JSON.stringify(res.detail));
},
},
onControlsToggle: function (res : VideoControlsToggleEvent) {
onControlsToggle: function (res :
Uni
VideoControlsToggleEvent) {
console.log(res.type + " -> " + JSON.stringify(res.detail));
console.log(res.type + " -> " + JSON.stringify(res.detail));
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录