Search code examples
djangohtmlstreammp3playlist

Django 1.7 - Any way to stream mp3 playlists?


I am using django 1.7.5 on python 2.7 and I was wondering if there was a solution for streaming mp3 files? Preferably a stream player with an html5 fallback for non-flash devices.

I'm asking because I am having trouble finding something relevant that isn't over 3 years old and outdated to my version of django. I am open to any and all suggestions. I don't necessarily need a hand-holding solution but a nudge in the right direction would be REALLY appreciated!

EDIT: I did find this but I am not sure if I can implement it: http://www.schillmania.com/projects/soundmanager2/


Solution

  • Do you want to create playlists dynamically? Because if it's a static file (a mp3 or playlist file, etc) you basically do not need Django at all. A web server like nginx or Apache can serve the file directly to your javascript/HTML5 player. Or you put it in your static files or media folder if you use runserver.

    If you want to create a mp3 playlist for your frontend player with django, checkout this tutorial:

    http://www.djangobook.com/en/2.0/chapter13.html