edge浏览器 音频Uncaught (in promise) DOMException 报错
时间: 2023-08-13 10:10:28 浏览: 222
在Edge浏览器中,当尝试播放音频时,可能会出现"Uncaught (in promise) DOMException"错误。这个错误通常是由于用户没有与文档进行交互而导致的。\[1\]这是因为浏览器要求用户与页面进行交互后才能播放音频,以保护用户隐私和安全。要解决这个问题,可以在播放音频之前,确保用户与页面进行了交互,例如通过点击按钮或其他交互操作。这样就可以避免出现该错误。
#### 引用[.reference_title]
- *1* [audio自动、循环播放,调节音量DOMException: play() failed because the user didn‘t interact with the ...](https://blog.csdn.net/qq_38998250/article/details/118366935)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [头像裁剪和Uncaught DOMException: Failed to execute ‘toDataURL‘ on ‘HTMLCanvasElement‘: Tainted ...](https://blog.csdn.net/u012761510/article/details/115519535)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文