Safari PreventDefault无法与AudioContext一起使用

问题描述

用户关闭浏览器选项卡时,我正在借助“ beforeunload”事件显示一个对话框。以下是我使用的代码

[!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/Syntax/podfile.html#platform`.

代码在所有情况下均适用于chrome,firefox。但是当使用野生动物园时,如果我使用window.onbeforeunload = function(event) { event.preventDefault(); event.returnValue = ""; }; 创建了一个GainNode,则对话框不会显示。创建GainNode之后如何显示对话框?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)