原文:Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first.

最近在開發一個網站時,有個需要是 如果有新預警信息要在網頁中播放提示音。頁面打開會請求是否有新信息,有則播放提示音。在Chrome的最新瀏覽器中,播放會報錯,控制台顯示Uncaught in promise DOMException: play failed because the user didn t interact with the document first.搜索發現Chrome 為了 ...

2018-12-03 11:37 0 6915 推薦指數:

查看詳情

 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM