Hi all,
I was trying to create a plugin for VideoJS html 5 player for web2py.
Everything was nice with the demo video from VideoJS server when I
tried with my own.
It works with Chrome, IE, Safari, Firefox and ... doesn't with
iPhone.. (nor FlowPlayer flash player)
After some research, it appears it's because iDevices need the support
of HTTP_RANGE header in server. It is possible to add it to Rocket, or
is it already present ?
Here's the chunk of code to download files that I use:
def download():
import os, gluon.contenttype
if request.args[0].endswith('.avi'):
response.headers['Content-Type'] =
gluon.contenttype.contenttype('.mp4')
elif request.args[0].endswith('.jpg'):
response.headers['Content-Type'] =
gluon.contenttype.contenttype('.jpg')
# response.headers['Content-Disposition'] = request.args[0]
return response.stream(open(os.path.join(config.get('mediaDir'),
request.args[0])), 4096)
Thanks for your help !!!