Marketplace
Made in Webflow

Audio unmute/mute Javascript control

2732 views
site profile thumbnail

Description

Updates to Dropbox are complete and you can clone this project again. Now, you can hear the sound. Thank you for your patients. 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"); } }); });
Feeling inspired?If this Made In Webflow site sparked some inspo, why not get started on a project of your own? Clone a site, purchase a template or start building from scratch.

We miss comments too!

Right now, Made in Webflow doesn't offer all of the same functionality that Showcase did, like the ability to leave comments. But don't worry: We're working to bring comments back as soon as possible!

As always, we'd love to hear your feedback! Click the link below to take a short survey about Made in Webflow.

audiojavascriptwebflowcustomcodeaudio-cms

More by Ivan Badia

See profile
View details
circular-svg-effect
171
408