Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
Streaming Audio Files from Django Backend to Vue.js Frontend

I'm currently building a soundboard for our Pen and Paper session and I am loading the sounds as a static source from my Django backend as new Audio(data.url). I am simply using the Django Rest Framework to handle everything about the file data, like uploads and accessing the sound files:

class File(models.Model):
    file = models.FileField(upload_to='sound-files')
    filename = models.CharField(max_length=100)
    looped = models.BooleanField()
    type = models.CharField(
        max_length=16,
        choices=[('bgm', 'background music'), ('sfx', 'sound effects')],
        default="bgm"
    )

But the initial loading time for the clients may be long as it needs to load a bigger 1 hour sound file for example, so I want to stream the audio instead of load it as a src.

How can I go about implementing this in Django? Do I need to use another module on top of DRF or do I need to replace DRF entirely? And can I keep the instantiation of the new Audio() in the Frontend or is a different approach required there?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!