提交 62733a43 编写于 作者: 雪洛's avatar 雪洛

feat: 小程序getVideoInfo不支持项目文件

上级 f9c7d9b1
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('API-getVideoInfo', () => {
if (process.env.uniTestPlatformInfo.startsWith('web') || process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) {
if (
process.env.uniTestPlatformInfo.startsWith('web') ||
process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios') ||
process.env.uniTestPlatformInfo.toLowerCase().startsWith('mp')
) {
// web平台在自动化测试场景下API调用失败
it('pass', async () => {
expect(1).toBe(1);
......
......@@ -3,13 +3,6 @@
<scroll-view style="flex:1">
<!-- #endif -->
<page-head :title="title"></page-head>
<view class="uni-padding-wrap">
<view class="uni-title">
<text class="uni-subtitle-text">获取本地相对路径视频信息</text>
</view>
<video class="video" :src="relativeVideoPath" :controls="true"></video>
<text class="margin-top-10">{{relativeVideoInfo}}</text>
</view>
<view class="uni-padding-wrap">
<view class="uni-title">
<text class="uni-subtitle-text">获取本地绝对路径视频信息</text>
......@@ -19,7 +12,16 @@
<view class="uni-btn-v">
<button type="primary" @click="chooseVideo">拍摄视频或从相册中选择视频</button>
</view>
</view>
</view>
<!-- #ifndef MP -->
<view class="uni-padding-wrap">
<view class="uni-title">
<text class="uni-subtitle-text">获取本地相对路径视频信息</text>
</view>
<video class="video" :src="relativeVideoPath" :controls="true"></video>
<text class="margin-top-10">{{relativeVideoInfo}}</text>
</view>
<!-- #endif -->
<!-- #ifdef APP -->
</scroll-view>
<!-- #endif -->
......@@ -38,7 +40,8 @@
videoInfoForTest: null as UTSJSONObject | null
}
},
onReady() {
onReady() {
// #ifndef MP
uni.getVideoInfo({
src: this.relativeVideoPath,
success: (res) => {
......@@ -52,7 +55,8 @@
showCancel: false
});
}
});
});
// #endif
},
methods: {
chooseVideo() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册