forked from dcloudio/hello-uniapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaudio.vue
More file actions
29 lines (29 loc) · 825 Bytes
/
audio.vue
File metadata and controls
29 lines (29 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<template>
<view>
<page-head title="audio"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-center">
<audio style="text-align: left" :src="current.src" :poster="current.poster" :name="current.name" :author="current.author"
:action="audioAction" controls></audio>
<view class="">audio组件不再维护,建议使用能力更强的uni.createInnerAudioContext()</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
current: {
poster: 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/audio/music.jpg',
name: '致爱丽丝',
author: '暂无',
src: 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/audio/music.mp3',
},
audioAction: {
method: 'pause'
}
}
}
}
</script>