Double Tap to Play or Pause the WordPress Audio Player on Touch Devices

Plugin:

Wonder Audio Player

Tutorial:

In the tutorial Use the Space Key to Play or Pause the WordPress Audio Player, we learned how to use the space key to control the audio player. However, on touch devices, there isn't a keyboard available. This tutorial will guide you on how to play or pause the WordPress audio player on touch devices by double-tapping the webpage in mobile web browsers. This tutorial also provides code to support double-click on regular desktop and laptop computers.
Continue reading

Use the Space Key to Play or Pause the WordPress Audio Player.

Plugin:

Wonder Audio Player

Tutorial:

This tutorial will guide you on how to enable the space key to play or pause the WordPress audio player created with Wonder Audio Player. It will also provide the code to use the left arrow key for playing the previous track and the right arrow key for playing the next track.

Continue reading

How to add extra buttons to control a WordPress audio player on the same webpage

This tutorial will guide you how to add your own buttons to play/pause/rewind/fast forward a WordPress audio player created with the plugin Wonder Audio Player.

If the audio player has a playlist, the tutorial will also guide you how to add buttons to play a specific song in the playlist or switch to the previous or next song.

There are two steps in this tutorial:

  • Step 1 - Create an audio player with Wonder Audio Player plugin
  • Step 2 - Add buttons with inline JavaScript to control the audio player
  • Optional - Use custom JavaScript to control the audio player

Continue reading

How to load Wonder plugin JS files as non-render blocking and improve the webpage loading performance

Product:

All Wonder Plugins

Tutorial:

By default, Wonder plugins load the plugin JS files in the WordPress header. While this provides best compatibility with all kinds of WordPress themes, JS files in the header will be render-blocking. That's, the webpage will only be rendered after the JS files are loaded.

There are two methods to load the JS files as non-render blocking and fix the issue.

  • First method: load Wonder plugin JS files in the WordPress footer
  • Second method: use a third-party plugin to aggregate the JS files and load it as non-render blocking

We will also discuss plugin conditional loading at the end of this tutorial:

  • Plugin conditional loading: only load plugins on selected pages or posts

Continue reading

How to add time marks to WordPress audio player

This tutorial will guide you how to add time marks to a WordPress audio player created with the plugin Wonder Audio Player. When clicking on the time mark, the player will jump to the specified time and start playing.

The tutorial will also guide you how to add play, pause, rewind and forward buttons to the player.

There are two steps in this tutorial:

  • Step 1 - Create an audio player with Wonder Audio Player plugin
  • Step 2 - Add time marks to the audio player

Continue reading

How to add gallery shortcode to X theme Cornerstone page builder

Product:

WonderPlugin 3D Carousel,
WonderPlugin Audio Player,
WonderPlugin Carousel,
WonderPlugin Gallery,
WonderPlugin Portfolio Grid Gallery,
WonderPlugin Tabs,
WonderPlugin Slider

Question:

How could I add the gallery shortcode to the WordPress X theme Cornerstone page builder?
Continue reading

Playing audio on the first page visit of the website

Product:

WonderPlugin Audio Player

Question:

I wonder is there a way to play an audio snippet 30 seconds after someone lands on any page of my website, but I would only want it to play once...not each time they go to a new page. Is that possible and would it be simple to do?

Continue reading

WordPress Audio Player API Event

Product:

WonderPlugin Audio Player

Question:

I want to know how to write javascript to catch the event play and stop.

Answer:

You could use the following JavaScript code:

jQuery("#wonderpluginaudio-1").on("amazingaudioplayer.played", function(event, data) {
  console.log(event);
  console.log(data);
});

jQuery("#wonderpluginaudio-1").on("amazingaudioplayer.ended", function(event, data) {
  console.log(event);
  console.log(data);
});

jQuery("#wonderpluginaudio-1").on("amazingaudioplayer.paused", function(event, data) {
  console.log(event);
  console.log(data);
});

jQuery("#wonderpluginaudio-1").on("amazingaudioplayer.switched", function(event, data) {
  console.log(event);
  console.log(data);
});

Please change the number 1 in the above code to the ID of your player.