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

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

上级 f9c7d9b1
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ // uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('API-getVideoInfo', () => { 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调用失败 // web平台在自动化测试场景下API调用失败
it('pass', async () => { it('pass', async () => {
expect(1).toBe(1); expect(1).toBe(1);
......
...@@ -3,13 +3,6 @@ ...@@ -3,13 +3,6 @@
<scroll-view style="flex:1"> <scroll-view style="flex:1">
<!-- #endif --> <!-- #endif -->
<page-head :title="title"></page-head> <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-padding-wrap">
<view class="uni-title"> <view class="uni-title">
<text class="uni-subtitle-text">获取本地绝对路径视频信息</text> <text class="uni-subtitle-text">获取本地绝对路径视频信息</text>
...@@ -20,6 +13,15 @@ ...@@ -20,6 +13,15 @@
<button type="primary" @click="chooseVideo">拍摄视频或从相册中选择视频</button> <button type="primary" @click="chooseVideo">拍摄视频或从相册中选择视频</button>
</view> </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 --> <!-- #ifdef APP -->
</scroll-view> </scroll-view>
<!-- #endif --> <!-- #endif -->
...@@ -39,6 +41,7 @@ ...@@ -39,6 +41,7 @@
} }
}, },
onReady() { onReady() {
// #ifndef MP
uni.getVideoInfo({ uni.getVideoInfo({
src: this.relativeVideoPath, src: this.relativeVideoPath,
success: (res) => { success: (res) => {
...@@ -53,6 +56,7 @@ ...@@ -53,6 +56,7 @@
}); });
} }
}); });
// #endif
}, },
methods: { methods: {
chooseVideo() { chooseVideo() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册