新增发送语音消息成功提示音

This commit is contained in:
唐明明
2022-02-24 15:40:59 +08:00
parent 81543cdcdc
commit 75d73e9c87
5 changed files with 11 additions and 0 deletions

BIN
pages/.DS_Store vendored

Binary file not shown.

View File

@@ -140,6 +140,7 @@
this.mp3AudioSrc = null
setTimeout(() => {
this.$emit('success')
this.toastAudiMp3()
}, 500)
})
},
@@ -180,6 +181,16 @@
this.isBetaPlay = false;
betaAudio.destroy()
})
},
// 播放提示音乐
toastAudiMp3(){
let toastAudio = uni.createInnerAudioContext()
toastAudio.src = require('@/static/im/toast/sentVoice.mp3')
toastAudio.autoplay = true
toastAudio.volume = .1
toastAudio.onEnded(() => {
toastAudio.destroy()
})
}
}
}