skip to Main Content

Html – Videos not autoplaying on mobile

I'm using reactjs and for some reason, videos are not autoplaying on mobile. I'm using iOS 17, Safari Here is my code: <div className="video" ref={videoRef} dangerouslySetInnerHTML={{ __html: ` <video loop muted autoplay playsinline muted defaultMuted loop > <source src=${video} type="video/mp4"…

VIEW QUESTION

I want to run code at a certain video timestamp in JavaScript

I want to do a cool CSS background change to match with the video. I use this code: document.getElementById("video").addEventListener("playing",video,false); function video(){ if(document.getElementById('video').currentTime >= 3.466) { document.getElementById("body").style.backgroundColor = "black"; } else { document.getElementById('video').addEventListener("timeupdate", video()); } } I was hoping that when…

VIEW QUESTION
Back To Top
Search