提交 b37c4f68 编写于 作者: Anne_LXM's avatar Anne_LXM

调整inner-audio音频格式/路径示例

上级 d8dd1a17
...@@ -8,6 +8,14 @@ ...@@ -8,6 +8,14 @@
<text class="uni-subtitle-text">{{item.format}}</text> <text class="uni-subtitle-text">{{item.format}}</text>
<image class="icon-play" :src="(isPlaying && playIndex==index)?'/static/pause.png':'/static/play.png'" @click="play(item.src,index)"></image> <image class="icon-play" :src="(isPlaying && playIndex==index)?'/static/pause.png':'/static/play.png'" @click="play(item.src,index)"></image>
</view> </view>
<view class="uni-title">
<text class="uni-title-text">不支持的音频格式</text>
</view>
<view class="formats" v-for="(item,index) in notSupportFormats" :key="index">
<text class="uni-subtitle-text">{{item.format}}</text>
<image class="icon-play" :src="(isPlaying && playIndex==index)?'/static/pause.png':'/static/play.png'" @click="play(item.src,index)"></image>
</view>
</view> </view>
</template> </template>
...@@ -53,18 +61,24 @@ ...@@ -53,18 +61,24 @@
format: 'wav', format: 'wav',
src: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/audio/ForElise.wav' src: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/audio/ForElise.wav'
}, },
// { ] as Array<AudioFormat>,
// format: 'wma', notSupportFormats:[
// src: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/audio/ForElise.wma' {
// }, format: 'wma',
// { src: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/audio/ForElise.wma'
// format: 'aiff', },
// src: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/audio/ForElise.aiff' {
// }, format: 'aiff',
// { src: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/audio/ForElise.aiff'
// format: 'caf', },
// src: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/audio/ForElise.caf' {
// }, format: 'caf',
src: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/audio/ForElise.caf'
},
{
format: '错误格式',
src: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/audio/ForElise.wmaa'
},
] as Array<AudioFormat> ] as Array<AudioFormat>
} }
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<page-head :title="title"></page-head> <page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view class="uni-title"> <view class="uni-title">
<text class="uni-title-text">支持的音频路径示例</text> <text class="uni-title-text">音频路径示例</text>
</view> </view>
<view class="formats" v-for="(item,index) in supportPaths" :key="index"> <view class="formats" v-for="(item,index) in supportPaths" :key="index">
<text class="uni-subtitle-text">{{item.description}}</text> <text class="uni-subtitle-text">{{item.description}}</text>
...@@ -36,6 +36,14 @@ ...@@ -36,6 +36,14 @@
description: '网络路径', description: '网络路径',
src: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/audio/ForElise.mp3' src: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/audio/ForElise.mp3'
}, },
{
description: '不存在的音频',
src: 'https://web-ext-storage.dcloud.net.cn/uni-app-x/audio/invalid_url.mp3'
},
{
description: '错误路径',
src: '../static/test-audio/ForElise.mp3'
},
] as Array<AudioPath> ] as Array<AudioPath>
} }
}, },
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<navigator url="/pages/API/inner-audio/inner-audio-format" class="uni-btn"> <navigator url="/pages/API/inner-audio/inner-audio-format" class="uni-btn">
<button type="primary" @click="pause">音频格式示例</button> <button type="primary" @click="pause">音频格式示例</button>
</navigator> </navigator>
<navigator url="/pages/API/inner-audio/inner-audio-path" class="uni-btn"> <navigator url="/pages/API/inner-audio/inner-audio-path" class="uni-btn uni-common-mb">
<button type="primary" @click="pause">音频路径示例</button> <button type="primary" @click="pause">音频路径示例</button>
</navigator> </navigator>
</view> </view>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册