video tag html
<!DOCTYPE html>
<html>
<body>
<h1>Video TITLE</h1>
<video width="320" height="240" controls>
<source src="Video Link">
</video>
</body>
</html>
video tag html
<!DOCTYPE html>
<html>
<body>
<h1>Video TITLE</h1>
<video width="320" height="240" controls>
<source src="Video Link">
</video>
</body>
</html>
html video
<div id='home-video' class="dl-neon-vid"><center>
<video playsinline loop muted autoplay width="100%">
<source src="video-link" />
</video></center>
</div>
<!-- script to pause ALL VIDEOS ON THE HOME PAGE when out of viewport -->
<script>
let options = {
root: null,
rootMargin:'0px',
threshold:1.0
};
let callback = (entries, observer)=>{
entries.forEach(entry => {
if(entry.target.id == 'home-video')
{
if(entry.isIntersecting){
entry.target.play();
}
else{
entry.target.pause();
}
}
});
}
let observer = new IntersectionObserver(callback, options);
observer.observe(document.querySelector('#home-video'));
</script>
html video play
var vid = document.getElementById("myVideo");
function playVid() {
vid.play();
}
function pauseVid() {
vid.pause();
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us