Okay
  Public Ticket #2895806
Automatically Grab Current Playing MP3?
Closed

Comments

  • Jonnie started the conversation

    Hello, I have a DJ remixing website, I currently have advanced custom fields with a preview mp3 file and I am displaying all my products with Product Table Barn2k plugin. Each table has a preview button to  play a demo mp3.


    How can I put a sticky waveform player when a user clicks one of the play buttons on our table? Please check our website to understand.

  •  1,103
    Max replied

    Hello Jonnie,

    How to you display the player on your Barn2K plugin ? by using shortcode?

    if so, what is the shortcode you are using?


    Thanks,


    Max from the Sonaar.io Crew

  • Jonnie replied

    Hello Max, this is the shortcode I use for Barn2k WooCommerce Product Table plugin. By the way, I have a play button, not an actual player. Also, I have it on one of my WooCommerce php files. The player is on cf:preview, which uses custom field.


    <?php echo do_shortcode( sprintf( '[product_table include="' . get_the_ID() . '" columns="date,tax:remixer,name:Track Name,tax:bpm,categories:Genre,cf:preview,add-to-cart:Buy,price" shortcodes="true" display_page_length="false" links="none" sort_by="date" display_search_box="false" display_totals="false"]', get_queried_object_id() ) ); ?>

  •  1,103
    Max replied

    You can use some javascript code to call the STICKY Footer player and its functions. The code below only belong to the STICKY player.

    IRON.sonaar.player.setPlayerAndPlay({ id:"1218"}) 

    Where id is the post ID of your playlist post type you want to play. To find out your post ID, see screenshot: https://d.pr/i/KH79f2

    It's important that the id reside inside double quotes.

    Thanks,


    Max from the Sonaar.io Crew