Okay
  Public Ticket #3114606
Dynamic selection of Post MP3 and extending playback controls
Closed

Comments

  • Cathal started the conversation

    Hi,

    From reading your docs I think I can dynamically link the MP3 player using Elementor to a single audio file stored on a custom post? 

    I'm trying to recreate the functionality on the URL I've provided above. Two audio players each playing a single track from two custom post fields. But as you can see the player functionality is extended to select playback speed but also to loop between a user selected start and end time. The javascript used can be viewed in the page source.   Can this functionality be added to the Sonaar MP3 in Elementor? 

  •  667
    Alexandre replied

    Hi Cathal, 

    1- Our player already have a speed rate button (see here), but if you want to developpe your own button you can use those function.

    -If the sticky player is not enable, and the Synthetic wave enable:
    sr_setAudioElementInstance().playbackRate = 1; (1 is normal speed)


    -If the sticky player is not enable, and the Dynamic  wave enable:
    wavesurfer.setPlaybackRate( 1 ); (1 is normal speed)


    -If the sticky player is enable, and the Synthetic wave enable:
    document.getElementById("sonaar-audio").playbackRate = 1; (1 is normal speed)


    -If the sticky player is enable, and the Dynamic wave enable:
    IRON.sonaar.player.wavesurfer.setPlaybackRate( 1 ); (1 is normal speed)



    2- Unfortunatelly we didnt have developped a loop feature.

    Thanks,


    Alexandre from the Sonaar.io Crew