Basic HTML5 video functions
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 - 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(); }
}
Developer | Jelmer |
Username | jelmerdemaat |
Uploaded | December 02, 2022 |
Rating | 3 |
Size | 1,734 Kb |
Views | 12,144 |
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!
Name | Size |
A Pen by Jelmer | 1,718 Kb |
Check comment length to filter unuseful ones | 2,759 Kb |
Get Gist comments using GitHub API | 2,020 Kb |
Justified divs, attempt 3 | 1,816 Kb |
Animated counter element | 3,412 Kb |
Responsive form design | 4,074 Kb |
CSS only slider | 3,131 Kb |
Test current page in Google PageSpeed | 1,909 Kb |
CSS grid system using justify | 2,626 Kb |
CSS only loading spinner | 2,086 Kb |
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!
Name | Username | Size |
Main page display | BarryKe | 4,562 Kb |
Multiple jCarousel | Pafnuty | 2,461 Kb |
Portfolio Page | HuffmanJ25 | 5,240 Kb |
Twitch.tv API | Ryzokuken | 2,618 Kb |
A Pen by Jay | Jaycode | 3,784 Kb |
CSS- UI Element States Pseudo-Classes | Tesla809 | 2,206 Kb |
Project Euler Problem 17 | Bfillmer | 2,739 Kb |
Cool Page Split Effect | Anthonyadamski | 6,128 Kb |
Jquery 2d character movement | Drewtadams | 4,291 Kb |
FreeCodeCamp - Simon Game | Ivhed | 8,481 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!