audio.vue 833 B

1234567891011121314151617181920212223242526272829
  1. <template>
  2. <view>
  3. <page-head title="audio"></page-head>
  4. <view class="uni-padding-wrap uni-common-mt">
  5. <view class="uni-center">
  6. <audio style="text-align: left" :src="current.src" :poster="current.poster" :name="current.name" :author="current.author"
  7. :action="audioAction" controls></audio>
  8. <view class="">audio组件不再维护,建议使用能力更强的uni.createInnerAudioContext()</view>
  9. </view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. current: {
  18. poster: 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/audio/music.jpg',
  19. name: '致爱丽丝',
  20. author: '暂无',
  21. src: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3',
  22. },
  23. audioAction: {
  24. method: 'pause'
  25. }
  26. }
  27. }
  28. }
  29. </script>