小码侬
小码侬
  • 发布:2023-04-07 17:16
  • 更新:2023-04-07 17:44
  • 阅读:253

【报Bug】uni.createInnerAudioContext() 微信小程序进入后台不能播放音频

分类:uni-app

产品分类: uniapp/小程序/微信

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win10

HBuilderX类型: 正式

HBuilderX版本号: 3.6.4

第三方开发者工具版本号: 1.06.2301160

基础库版本号: 2.25.3

项目创建方式: HBuilderX

示例代码:
this.sound1 = uni.createInnerAudioContext()  
this.sound1.loop = true  
this.autoplay = true  
this.sound1.src = 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3'  
this.sound1.sessionCategory = 'playback'  
this.sound1.play()

操作步骤:

微信小程序打开时能正常播放音频,在小程序进入后台音频就停了,不能播放了

预期结果:

微信小程序打开时能正常播放音频,在小程序进入后台音频能正常接着播放

实际结果:

微信小程序打开时能正常播放音频,在小程序进入后台音频就停了,不能播放了

bug描述:

uni.createInnerAudioContext() 播放mp3音频,在微信小程序进入后台后不能播放音频

2023-04-07 17:16 负责人:无 分享
已邀请:
DCloud_UNI_WZF

DCloud_UNI_WZF

验证下微信小程序原生开发是否存在相同问题,如存在,微信开发社区反馈

要回复问题请先登录注册