音訊播放時出現 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD
<audio id="play" controls="controls" loop="loop"> <source src="horse.mp3" type="audio/mpeg"> </audio>
瀏覽器出現:Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD
原因:Chrome的autoplay政策在2018年4月做了更改。
解決辦法:
第一步,在chrome瀏覽器中輸入:chrome://flags/#autoplay-policy
第二步,在Autoplay policy中將Default改為No user gesture is required
第三步,重啟Chrome
相關推薦
音訊播放時出現 Uncaught (in promise) DOMException: play() failed because the user didn39;t interact with the document first. https://goo.gl/xX8pDD
<audio id="play" controls="controls" loop="loop"> <source src="horse.mp3" type="audio/mpeg"> </audio>瀏覽器出現:Uncaught (in promise) DOM
Uncaught (in promise) DOMException: play() failed because the user didn39;t interact with the document first.
rom 方案 with lag 開會 請求 頁面 搜索 red 最近在開發一個網站時,有個需要是 如果有新預警信息要在網頁中播放提示音。頁面打開會請求是否有新信息,有則播放提示音。在Chrome的最新瀏覽器中,播放會報錯,控制臺顯示Uncaught (in promise)
Uncaught (in promise) DOMException: play() failed because the user didn39;t interact
Chrome的autoplay政策在2018年4月做了更改。 新的行為:瀏覽器為了提高使用者體驗,減少資料消耗,現在都在遵循autoplay政策,Chrome的autoplay 政策非常簡單 muted autoplay始終被允許 音樂的autoplay 只有在下
Uncaught (in promise) DOMException: play() failed because the user didn't interact
Chrome的autoplay政策在2018年4月做了更改。 新的行為:瀏覽器為了提高使用者體驗,減少資料消耗,現在都在遵循autoplay政策,Chrome的autoplay 政策非常簡單 muted autoplay始終被允許 音樂的autoplay
用jQuery實現播放時出現的錯誤
畫面 query 今天 absolut htm 元素 play body 我們 今天,我在項目時,我的朋友讓我給她找錯誤,她說她用jQuery寫視頻的播放,獲取的按鈕也對,使用的方法也對,就是播放不了。 她的思路是這樣的,在剛開始的視頻畫面上有個播放按鈕,她想
VUE 報這個錯,在瀏覽器的 console 中報 uncaught in promise
分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!  
執行SparkStreaming程式時出現 Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.ArrowA異常
Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.ArrowA 這個問題是版本不統一導致的。 之前是2.11,編譯出問題
安裝maven3.5時出現Exception in thread "main" java.lang.UnsupportedClassVersionError
安裝完maven-3.5,並配置好環境變數之後,在命令列輸入mvn -v時出現異常如下[Exception in thread “main” Java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Uns
axios 在 webpack 打包報錯:Uncaught (in promise) TypeError: Cannot read property 39;protocol39; of undefined
解決方法: import axios from 'axios' // 在這裡不能使用 Vue.use(axios) // Vue.use(axios) Vue.prototype.$http = axios 模組引用: // 基於vue的
解決辦法:CMake編譯時出現“error in configuration process project files may be invalid”
無論是CMake2.84 還是當前最新的CMake2.87都可能會出現這種錯: 查遍國內外的網上都沒有給出可行辦法,結果還是自己解決了 現把出錯原因和解決辦法如下: 出錯原因:因是英文版本,通常安裝沒有看說明,按預設的安裝而"下一步"再下一步,結果是在安裝中要選擇你
Oozie時出現Exception in thread "main" java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor versi
不多說,直接上乾貨! 問題詳情 [[email protected] oozie-4.1.0-cdh5.5.4]$ bin/ooziedb.sh create -sqlfile oozie.sql -run DB Connection [[ema
pip安裝軟體時出現Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build*的解決方案
本文只提供本人的一些經驗,不代表可以解決所有人的問題。 pip安裝軟體時出現:Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-*(其中×與要安裝的軟體有關) 比如安
當在編寫jquery程式碼時出現Uncaught SyntaxError: Unexpected identifier怎麼解決
Uncaught SyntaxError: Unexpected identifier的意思是未捕獲syntaxerror:意想不到的識別符號當在編寫jquery程式碼出現Uncaught SyntaxError: Unexpected identifier錯誤時,可能是瀏覽
EasyNVR網頁/微信播放RTSP攝像機HLS/RTMP播放時出現起播等待問題的優化過程
EasyNVR 專案中, 我們需要在網頁/微信中嵌入 HLS 播放器, 實現直播效果. 開發過程中, 我們調研了很多HLS播放器, 包括 百度cyberplayer, ckplayer, flowplayer, videojs, 我們重點試用了 cyberplayer 和 v
【爬坑】Python 3.6 在 Socket 程式設計時出現型別錯誤 TypeError: a bytes-like object is required, not 39;str39;
1. 問題描述 Python 3.6 在 Socket 程式設計時出現錯誤如下 Traceback (most recent call last): File "F:/share/IdeaProjects/test/mypython/test/test10_tcpcli
hive在執行查詢sql時出現java.lang.IllegalArgumentException: Wrong FS: hdfs://node1:9000/user/hive/warehouse/.
hive在執行查詢sql時出現java.lang.IllegalArgumentException: Wrong FS: hdfs://node1:9000/user/hive/warehouse/test1.db/t1, expected: hdfs://cl
1、webpack搭建專案時出現的報錯“Module build failed (from ./node_modules/css-loader/dist/cjs.js) CssSyntaxError”
控制檯出現的錯誤如下: webpack.config.js中的配置如下: module.exports={ entry:'./src/main.js
android studio程式設計時出現的錯誤:Error:Execution failed for task 39;:app:buildInfoDebugLoader39;. > Exception whi
用Android Studio中設定navigation的menu時候出現的問題:(其他問題同理) Error:Execution failed for task ':app:buildInfoDebugLoader'. > Exception while doing pa
編譯時出現錯誤 -- clang: error: linker command failed with exit code 1 (use -v to see invocation)
出現這個錯誤的原因有多種,常見的是因為某些檔案的缺失或者是檔案的重複導致的。 這類錯誤檢視的關鍵在於其上一行的文字。 對於檔案缺少而導致錯誤的情況: 例如上圖中的示例,其上一行文字為 ld:library not found for -lrxl,可以看出是缺失了某一
Exception in thread "main" java.util.MissingResourceException: Can39;t find bundle for base name Message, locale zh_CN
bundle 描述 str 圖片 ava thread 進行 sage mis 問題描述:今天在進行程序國際化編程時,碰到MissingResourceException異常,大意是沒有找到屬性文件。當時項目目錄如下: 我把兩個屬性文件放到源碼包下,所以會出現問題。 解決