uni.getBackgroundAudioManager()存在一个写手机上不能后台播放音频,如何处理呢?
下边是我写的代码片段
if (app.MemberID && receiveInfo.MessageBody && currentPage.route != 'page-exchange/consult/consult' && receiveInfo.MessageBody.type == 'user' && receiveInfo.IsMemberFirstMessage && receiveInfo.IsMemberFirstMessage == 1) {
// if (true) {
globalSeekbgAudioManager = uni.getBackgroundAudioManager();
globalSeekbgAudioManager.title = '农千问新咨询提醒';
globalSeekbgAudioManager.epname = '农千问新咨询提醒';
globalSeekbgAudioManager.singer = '农千问新咨询提醒';
// globalSeekbgAudioManager.protocol = 'hls';
globalSeekbgAudioManager.coverImgUrl = app.staticImageUrl + 'new_seek_poster.png';
globalSeekbgAudioManager.src = app.staticImageUrl + 'new_seek_notice.mp3';
globalSeekbgAudioManager.play();
};
c***@163.com
- 发布:2024-05-15 12:50
- 更新:2024-05-15 12:50
- 阅读:106
uni.getBackgroundAudioManager()在部分手机上无法后台播放音频(iphone14promax,iphoen7p)?
分类:uni-app
0 个回复