Changeset bfc6b5f


Ignore:
Timestamp:
Apr 2, 2012 12:27:28 PM (3 years ago)
Author:
yomguy <yomguy@…>
Branches:
master, crem, crem2, crem3, dev, dev2, diadems, dj1.6, feature/breadcrumbs, feature/ts-0.5, feature/ts-0.5.4, feature/writecache, generic, instru_search, lam, lam2, mapsv3, merge, nlivemulti, prob, production, release/1.4.4, sabiod, search, security, server, social, storage, telecaster, test
Children:
54cb70b, 7566b3e, eb1356d, ef72a4d, 57305a5
Parents:
a29e589
git-author:
yomguy <yomguy@…> (02/04/2012 12:27:28)
git-committer:
yomguy <yomguy@…> (02/04/2012 12:27:28)
Message:

add MP4 streaming

File:
1 edited

Legend:

Unmodified
Added
Removed
  • telemeta/views/base.py

    ra29e589 rbfc6b5f  
    931931            return render(request, 'telemeta/messages.html', {'description' : description}) 
    932932 
     933        #FIXME: MP4 handling in TimeSide 
     934        if 'mp4' in extension: 
     935            mime_type = 'video/mp4' 
     936            video = item.file.path 
     937            response = HttpResponse(stream_from_file(video), mimetype = mime_type) 
     938            response['Content-Disposition'] = 'attachment' 
     939            return response 
     940 
    933941        for encoder in self.encoders: 
    934942            if encoder.file_extension() == extension: 
Note: See TracChangeset for help on using the changeset viewer.