LoginGet started — it’s free
Made in Webflow

Audio unmute/mute Javascript control

1132 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.
audiojavascriptwebflowcustomcode

More by Ivan Badia

See profile
View details
circular-svg-effect
120
319
© 2022 Webflow, Inc. All rights reserved.