Clone Project

Audio unmute/mute Javascript control

Description:  
Author 
Ivan Badia
Organization 
Similar Projects
Oops! Something went wrong while submitting the form.
Description from Webflow:  
Using custom code to control unmuting and muting sound. Video independent of the sound file loading from a cloud server ( Dropbox ). By default all audio URLs end with d1=0, if left with default settings sound wont play change to d1=1. Custom Code : <audio src="https://youraudiosource.com" class="audio"> // The audio HTML element const audio = document.querySelector('audio'); let playing = false; // Check if document is ready $(document).ready(function(){ // Clicking the play_btn $('.play_btn').click(function(){ if (playing == true) { audio.pause(); playing = false; // Setting the button text $(this).html("Play"); } else { audio.play(); playing = true; // Setting the button text $(this).html("Pause"); } }); });
Tags from Webflow: 
audio, javascript, webflowcustomcode

The best Webflow projects handpicked & delivered.

We search the entire Webflow showcase to find the most clone-worthy* websites.

*The kind of sites that make you say "wait... this is free?"
Sites will be complete, clean, and client ready.

Booyah! The first newsletter will go out early next week.
Oops! Something went wrong while submitting the form.

*The kind of sites that make you say "wait... this is free?" Sites will be complete, clean, and client ready.

Booyah! The first newsletter will go out early next week.
Oops! Something went wrong while submitting the form.
.