If you want to remove the download or share button and only keep the other one in the player playlist, in the Audio Player Editor, go to step 3 Options tab, Playlist, check the option Customise the playlist item format, then remove the macro string %DOWNLOADBUTTON% or %SHAREBUTTON%. To add the player to a WordPress post or page, copy the provided shortcode and add it to the post or page editor.Īdditional - Remove the download or share button and only keep the other one The plugin will create the player and display its shortcode. #Html5 audio prevent download skin#In step 2 Skins tab, select a skin with download and share buttons.Ĭlick the Save & Publish button to save the audio player. If the file is hosted on an external website, when clicking on the download button, web browsers will open the mp3 file in a new tab, instead of directly downloading it. Please note, to make an audio file downloadable, it must be hosted on the same WordPress website, for example, you can upload your mp3 files to your WordPress Media Library. In Audio Player Editor, step 1, Mp3 tab, click the Add Audio button to add your mp3 or wav files. Step 2 - Create a WordPress audio player with download and share buttons in Wonder Audio PlayerĪfter you have installed Wonder Audio Player, in your WordPress backend, left menu, go to Wonder Audio Player -> New Audio Player, create a new audio player. #Html5 audio prevent download trial#You can download the free trial version from the plugin home page, test it, make sure it works for you before upgrading to the commercial version. #Html5 audio prevent download install#Play → triggered once the audio starts playing audio.Step 1 - Install Wonder Audio Player pluginįirst please install the WordPress premium plugin Wonder Audio Player. If the media has no known end (such as for livestreams of unknown duration, web radio, media incoming from WebRTC, and so forth), this value is +Infinity.If no media is present on the element, or the media is not valid, the returned value is NaN.To get the duration of the audio, you can use duration attribute. To fast forward 30 seconds, use this: myAudio.currentTime = 30 ay() Duration myAudio.currentTime = 0 ay() Fast forward To rewind the track, you can use the following. currentTime returns a double-precision, floating-point value indicating the current playback position, in seconds, of the audio. You can get the current playback time of audio using the currentTime attribute. audio.volume = 1 // 100 % audio.volume = 0.5 // 50% Current time You can change the browser volume using the following. To play the paused audio, you can use play method. To pause the audio, you can use pause method. let isPaused = audio.paused let isPlaying = !isPaused Control audio If the audio is playing, then paused is false, otherwise true. let audio = document.getElementById('audio') Check audio stateĬheck whether the audio is paused by using the paused attribute. Note: Audio is subject to CORS, and unless you allow it on the server, an audio file can’t be played cross-origin. You can enable the audio to play in a loop (i.e., the audio will play continuously from the beginning after it has played completely) by setting the loop attribute. If you set the muted attribute, then the audio sound will be muted.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |