0
尋找比這更好的解決方案:jQuery的:播放視頻懸停
$(".video-post").hover(function() {
$(this).find("video").get(0).play();
}, function() {
$(this).find("video").get(0).pause();
});
- >它的工作原理,但會導致鉻錯誤: 拋出:DOMException:播放()請求被調用中斷暫停() 。
Theres關於這方面的一些文章,但似乎找不到任何簡單的答案。 https://developers.google.com/web/updates/2017/06/play-request-was-interrupted