Okay
  Public Ticket #3080225
Issue Playing audio files on Pro Version
Closed

Comments

  • Kirby started the conversation

    Hi, I just purchased the pro version of your plugin and I'm using m3u8 files, they play nicely on mobile devices but they don't work on desktop. 

    The reason I'm using m3u8 is because they play instantly on mobile devices even if people are not using wifi or they have slow connections, I tried using mp3, AAC, I used different bitrates and file sizes and it takes around 5 to 7 seconds to load if you are not on wifi using your plugin. I also tried different devices and had friends on different countries testing it out and we got the same result. M3u8 plays right away on mobiles when not on wifi. 


    The other reason I'm using m3u8 files is that they are not easy to download, even if they use inspector tools or browser extensions. So if you are selling music this is a plus. 


    One solution I have in mind is to create two playlist. one with mp3 files and one with m3u8 and only display the m3u8 on mobile and mp3 on desktop, not an elegant solution and double the work but I could live with that until there is a fix for it.


    Is there any implementation I can do to make it work on desktop? 

    Thanks again for your time, I attached a website with the player with three m3u8 songs.

    https://kimibeats.com/  

  •  1,114
    Max replied

    Hi, 

    M3u8 files are not supported yet with a lot of browser. You can see the supported browsers here https://caniuse.com/?search=M3U8

    So unless browsers releases compatibility with it, you won't be able to use them I'm afraid. 


    Thanks,


    Max from the Sonaar.io Crew

  • Kirby replied

    That makes sense because I'm using apple devices and they are m3u8 supported.

    if I'm using mp3 files, what's the best implementation to make the songs play faster? 

    I've tried using amazon object storage with cloudfront cdn to serve the mp3 using external links on your plugin and still takes around 5 to 7 seconds to play without wifi.  I'm also using cloudflare + some optimizations and I still get the same results with the mp3 but I've seen a lot of different websites serving mp3 files and they play fast, so at this point I'm running out of ideas. 

    I've tried a lot of  audio player plugins and yours it's the best so far, it has everything I need.  I'm just trying to find the best solution for faster playback on mobile. 

    any thoughts? thanks

  •  1,114
    Max replied

    Host the file directly on your WordPress server instead of streaming from another server. It will be faster. 

    Thanks,


    Max from the Sonaar.io Crew

  • Kirby replied

    I will give a try.


    One last thing about m3u8,there is a acript for playing HLS/m3u8 files natively on all browsers that supports media source extensions ( all browsers ) according to caniuse.com


    It's an open source script called hls.js 

    i figured it out because there is another audio player for wordpress offering livestream and m3u8 support, I asked them and that is how they do it. 

    Hopefully that could be an implementation for your plugin.

  •  1,114
    Max replied

    Where can I have more info about this open source script? 

    Thanks,


    Max from the Sonaar.io Crew

  • Kirby replied

    Github:

    https://github.com/video-dev/hls.js/

    and the other plugin I told you is using jsdeliver to serve the script:

    Jsdeliver:

    https://www.jsdelivr.com/package/npm/hls.js


    hope it helps 👍🏻


  •  1,114
    Max replied

    Thanks for sharing. 

    You might want to hire a developer to implement this for you on your site. 

    Currently, it's not in our plan to include it in our package but I'll keep an eye on it.

    Thanks,


    Max from the Sonaar.io Crew