Video mute
How do I make an video mute?
What is a video mute? How do you make a video mute? This script and codes were developed by [SHM] on 17 January 2023, Tuesday.
Video mute - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Video mute</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <head>
<script src="https://code.jquery.com/jquery-git2.js"></script> <meta charset="utf-8"> <title>JS Bin</title>
</head>
<body> <div id="hero">
<!-- <button class="btn unmute"></button> --> <video class="video" src="https://s3.amazonaws.com/servingsites-videos/firstbaptistchurchofnorfolk/sample-welcome-video-2.mp4" autoplay loop ></video> </div>
</body> <script src="js/index.js"></script>
</body>
</html>
Video mute - Script Codes CSS Codes
*{ padding: 0; margin: 0; box-sizing: border-box; outline: none;
}
#hero{ height: 100vh; position: relative; margin: 0 !important; top: 0; width: 100%;
}
.video{ position: relative; left: 50%; top: 50%; margin: auto; transform: translate(-50%, -50%); min-width: 100%; min-height: 100%;
}
/*///////////////////////////////////*/
.btn{ position: relative; left: 20px; bottom: 10px; height: 100px; width: 100px; background-size: cover; cursor: pointer; z-index: 1;
}
.mute { background-image: url(https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Mute_Icon.svg/500px-Mute_Icon.svg.png);
}
.unmute{ background-image: url(http://cdn.osxdaily.com/wp-content/uploads/2010/11/sound-icon.png);
}
Video mute - Script Codes JS Codes
var $video = $('video'), $btn = $('.btn');
$btn.on('click', toggleMuteState);
$video.on('volumechange', toggleButtonClasses);
$video.prop('muted', false);
function toggleMuteState() { $video.prop('muted', !$video.prop('muted'));
}
function toggleButtonClasses() { $btn.toggleClass('mute unmute');
}
![Video mute - Script Codes](http://shots.codepen.io/leon9208/pen/aBvGPe-512.jpg)
Developer | [SHM] |
Username | leon9208 |
Uploaded | January 17, 2023 |
Rating | 3 |
Size | 2,131 Kb |
Views | 4,048 |
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 |
Video header | 2,039 Kb |
Image autoscroll | 2,008 Kb |
Hero zoom on scroll | 1,960 Kb |
Scroll Bar indicator | 1,840 Kb |
Cyclotron | 1,798 Kb |
Glitch text effect | 3,674 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 |
A Pen by Dalton Liu | Liudalton | 12,437 Kb |
React Template | Isac | 1,241 Kb |
Fun animations with CSS3 | Minimalmonkey | 2,360 Kb |
Brent Burns Tribute Page | Nevada48 | 2,569 Kb |
Scroll Arrow | Robooneus | 4,437 Kb |
Sticky footer testing | 75th | 1,649 Kb |
SVG hamburger menu button | Elifitch | 2,602 Kb |
Sencha Touch 2.3.1 Basic Grid Example | Trozdol | 2,770 Kb |
SCSS Social Icons Flat | Mattsince87 | 3,482 Kb |
Loading animation - freedom purchase | Rocbear | 2,567 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!