• Hello,

    This plugin is great! I’m currently using it in conjunction with WPDatatables plugin to create a music databate that I call the Jukebox

    The problem is the mb.mini.audio player doesnt stop when I filter categories or paginate in the Jukebox. To see what I mean, load the Jukebox and play any song. As the song is playing, do a filtered search or paginate to the next page of the jukebox… you’ll notice that the song keeps playing and if you press play on a new song, the two songs will be playing on top of each other. How can I make the first song stop playing after jqueries have been made in the Jukebox?

    Thanks so much for your help!

    Pierre

    https://ww.wp.xz.cn/plugins/wp-miniaudioplayer/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author pupunzi

    (@pupunzi)

    Hi,
    you can control and stop the actual player playing via javascript when you perform a search.

    A global javascript variable is set for the actual playing player:

    jQuery.mbMiniPlayer.actualPlayer

    to stop the player just add as callback of the Jukebox search the following:

    jQuery.mbMiniPlayer.actualPlayer.mb_miniPlayer_stop()

    You should update the plugin to the 1.8.2 version where I fixed a bug related to that.

    Thread Starter pierrecohenmusic

    (@pierrecohenmusic)

    Hi Pupunzi,

    Thanks for the reply! I updated the plugin and reached out to the table’s support and they helped me with their front-end callbacks (see documentation).

    I’m pasting this in the custom JS settings of the table’s plugin yet the player still isn’t stopping when I filter it or paginate on the table:

    jQuery(window).load(function(){
    wpDataTables.table_3.addOnDrawCallback(
    function(){
    jQuery.mbMiniPlayer.actualPlayer.mb_miniPlayer_stop();
    })
    });

    The table support team said everything looks good but it’s still not working.
    Is this the correct callback of the media player? If so, why is it not working?

    Thanks for making such a great free plugin. I just donated!

    Pierre

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Stop player when jquery elements are made on table’ is closed to new replies.