Skip to content

IOS webview audiocontext 播放无声音 #85

Open
@Topppy

Description

@Topppy

背景:

  1. The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page, 由于IOS的特殊性,audioContext的初始state='suspended', 不会播放声音;必须通过用户交互的回调中ctx.resume()来解锁ctx才能播放。
  2. 某iphone11+IOS14.7.1手机,在客户端播放声音的同时打开webview自动播放audioContext会没有声音,检测ctx.state = 'interrupted',同时客户端的声音也没有正常播放。

debug:

  1. 取消客户端声音播放调用,webview正常播放
  2. 修改客户端策略 独占 => 混合, 客户端和webview都正常播放

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions