|
|
@@ -0,0 +1,25 @@
|
|
|
+<template>
|
|
|
+ <ay-container></ay-container>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts" setup>
|
|
|
+const methods = {}
|
|
|
+
|
|
|
+const data = ay.initData({})
|
|
|
+
|
|
|
+ay.entrance((args) => {
|
|
|
+ const backgroundAudioManager = uni.getBackgroundAudioManager()
|
|
|
+
|
|
|
+ backgroundAudioManager.src = 'https://dwx.auyen.com/test.mp3'
|
|
|
+ backgroundAudioManager.title = '音频标题' // 音频标题(必填)
|
|
|
+ backgroundAudioManager.coverImgUrl = '' // 封面图 URL
|
|
|
+ backgroundAudioManager.epname = '专辑名' // 专辑名
|
|
|
+ backgroundAudioManager.singer = '歌手名' // 歌手名
|
|
|
+ backgroundAudioManager.playbackRate = 1 // 播放速度。范围 0.5-2.0,默认为 1
|
|
|
+ backgroundAudioManager.currentTime = 0 // 当前音频的播放位置(单位:s)
|
|
|
+ backgroundAudioManager.play() // 播放音频
|
|
|
+ // backgroundAudioManager.pause() // 暂停音频
|
|
|
+ // backgroundAudioManager.stop() // 停止播放
|
|
|
+})
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped></style>
|