Okay
  Public Ticket #2830590
Bunny.net Integration
Closed

Comments

  • Jaime started the conversation

    Hi,

    Any chance you guys can do a bunny.net integration so we could upload the files to their cdn and streeam them from their servers?

    I asked them if it was possible to stream mp3’s from their CDN and they said yes and told me how. I figured I shared it with you cause this could help keep the websites lean and fast.

    Here’s the instructions they gave me.

    “It is possible, you would create a new Storage Zone, upload the MP3s or similar files into there, connect it to a new Pull Zone.

    You will get publicly accessible MP3s, which you can link to a music player - for example, <audio> in HTML5.”

    Here are the respective API docs to create the integration.

    Storage API docs: https://docs.bunny.net/reference/storage-api

    CDN Pull Zone: https://docs.bunny.net/reference/pull-zone

  •  1,103
    Max replied

    Hello Jaime,

    This is something we might add to our roadmap if we receive more user requests about it.

    Does Bunny.net give you a specific public URL that link to your media file? if so, can you send it to me so I can check if it works?


    Thanks,


    Max from the Sonaar.io Crew

  • Jaime replied

    Hi Max. Yes sure. Will do so once back home. On the road with no access to my comp right now. 

  •   Jaime replied privately
  •  646
    Alexandre replied

    Hi, 
    The MP3 Player can stream https://mhmmkt.b-cdn.net/justice-league.mp3
    But you have to select the waveform type Synthetic https://d.pr/i/vEAtLk
    The dynamic wave is not allowed

    Thanks,


    Alexandre from the Sonaar.io Crew

  • Jaime replied

    Thanks Alexandre. Is that good or bad?

  •  646
    Alexandre replied

    Hi Jaime,

    The best is to have the option between synthetic & dynamic, but Synthetic still a good option

    The Synthetic loads by far faster than the dynamic wave, but its form  is fake. It is not related to the audio for real.

    Thanks,


    Alexandre from the Sonaar.io Crew

  • Jaime replied

    I see. Thanks for the update. Is there something that can be done to make it work with the dynamic wave?


    Thanks,

    -Jaime

  •  1,103
    Max replied

    If you want to use the dynamic wave, you will have to host the mp3 file on a server that you can control the htaccess so you can allow your website domain name to download mp3 file via XHR (javascript).

    This is what we call CORS Policy. More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin

    I doubt you can do this with Bunny CDN

    Thanks,


    Max from the Sonaar.io Crew

  • Jaime replied

    Just found out we can do the CORS policy on Bunny. See attached. What should I do, add the mp3 extension in there?

  •  1,103
    Max replied

    Hi,

    Im not familiar with Bunny.net but according to your screenshot, mp3 should be the extension to use.

    Thanks,


    Max from the Sonaar.io Crew