Basic HTML5 video functions

Developer
Size
1,734 Kb
Views
12,144

How do I make an basic html5 video functions?

What is a basic html5 video functions? How do you make a basic html5 video functions? This script and codes were developed by Jelmer on 02 December 2022, Friday.

Basic HTML5 video functions Previews

Basic HTML5 video functions - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Basic HTML5 video functions</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
</head>
<body> <video id="video" controls preload muted > <source src="//jelmerdemaat.nl/online-demos/conexus/video/small.mp4"></source> No video supported.
</video>
<br />
<a href="#fullscreen">Fullscreen</a> <script src="js/index.js"></script>
</body>
</html>

Basic HTML5 video functions - Script Codes JS Codes

var d = document, video = d.querySelector('#video'), fs = d.querySelector('a[href="#fullscreen"]'), log = d.querySelector('#log');
video.style.cursor = 'pointer';
fs.onclick = function(evt) { goFullscreen(video); video.play();
}
video.onclick = function(evt) { video.paused ? video.play() : video.pause();
}
video.onended = function(evt) { console.log(evt);
}
function goFullscreen(vid) { if (vid.requestFullscreen) { vid.requestFullscreen(); } else if (vid.msRequestFullScreen) { vid.msRequestFullScreen(); } else if (vid.mozRequestFullScreen) { vid.mozRequestFullScreen(); } else if (vid.webkitRequestFullscreen) { vid.webkitRequestFullscreen(); }
}
Basic HTML5 video functions - Script Codes
Basic HTML5 video functions - Script Codes
Home Page Home
Developer Jelmer
Username jelmerdemaat
Uploaded December 02, 2022
Rating 3
Size 1,734 Kb
Views 12,144
Do you need developer help for Basic HTML5 video functions?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Jelmer (jelmerdemaat) Script Codes
Create amazing web content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!