Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

add mute button to html5 video player

$("video").prop('muted', true);

$(".mute-video").click(function () {
    if ($("video").prop('muted')) {
        $("video").prop('muted', false);
        $(this).addClass('unmute-video'); // changing icon for button

    } else {
        $("video").prop('muted', true);
        $(this).removeClass('unmute-video'); // changing icon for button
    }
    console.log($("video").prop('muted'))
});
Comment

add mute button to html5 video player


<video width="320" height="240" controls muted>
  <source src="x" type="video/x">
  <source src="x" type="x">
</video>

Comment

PREVIOUS NEXT
Code Example
Javascript :: flutter or react native 
Javascript :: save jshint 
Javascript :: int val javascript 
Javascript :: body-parser vs express.json 
Javascript :: how to filter array in javascript 
Javascript :: execute command js 
Javascript :: for loop in shopify liquid template 
Javascript :: react alice carousel 
Javascript :: vscode react extensions 
Javascript :: how to use radio buttons in react class-based components 
Javascript :: regex pattern for password 
Javascript :: javascript equivalent of CTRL+F5 
Javascript :: JS how to determine if page was cached 
Javascript :: how to get product by category in woocommerce using rest api 
Javascript :: Change the text inside the <p tag: 
Javascript :: javascript remove object from array 
Javascript :: move item to end of array for of 
Javascript :: how to swap two elements in an array javascript 
Javascript :: how to run a bash script with node js 
Javascript :: jquery get text of element without child elements 
Javascript :: file_get_contents in javascript 
Javascript :: for each array javascript 
Javascript :: delete from list javascript 
Javascript :: how to convert an array into single quote strings 
Javascript :: how to create a pop up in middle screen javascript 
Javascript :: how to detect click outside div 
Javascript :: test window.location.reload() jest 
Javascript :: js store regex in variable and combine 
Javascript :: jquery once 
Javascript :: upi id regex 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =