[HTML+JAVASCRIPT] VIDEO TAG 啟動播放 循環播放 關閉控制項
2018-10-02
最近在幫朋友弄點東西,他需求是弄得像是 GIF 能夠自動撥放,然後不用有聲音,關閉控制項,因為轉 GIF 後檔案會變得很大,但是我測是了一下有許多玫玫角角,所以就筆記一下..
其中如果你遇到 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first.
其中你的 VIDEO TAG 要加上 mute="mute"
其中如果你遇到 DOMException: The play() request was interrupted by a call to pause()
必須要把 Javascript 中 啟動播放的部分 改成
遇到一些麻煩,所以筆記一下
reference:
https://stackoverflow.com/questions/49930680/how-to-handle-uncaught-in-promise-domexception-play-failed-because-the-use
https://hk.saowen.com/a/812e8f88e7cdea42a3223da5f62a36eba3eb9cd7d3527217ee796000244a758b
標籤:
ASP.net
,
Javascript
-- Yesterday I wrote down the code. I bet I could be your hero. I am a mighty little programmer. 如果這篇文章有幫助到您,簡單留個言,或是幫我按個讚,讓我有寫下去的動力...