When running Django in local mode using the runserver command video files are not loaded in the browser properly. I get the error
An error occurred trying to load the resource.
All other static files serve fine such as images, javascript and css.
3 Answers
Answers 1
I have found the answer finally, Django's runserver does not support byte range requests. See this thread:
https://groups.google.com/forum/#!msg/django-developers/NZ1qTkZ6vok/fhdz7rTtL1EJ
And this ticket:
Answers 2
Try running
python manage.py collectstatic
Of course you must have STATIC_ROOT and STATICFILES_DIRS set properly in your settings file.
Answers 3
You may want to try and change your <video>
tags to <source>
as follows:
<source src="{{ YOUR_MEDIA_FILE_URL }}*yourvideo*.*videoformat*" type="video/*videoformat*"></source>
- YOUR_MEDIA_FILE_URL: Works like the STATIC_URL documented examples.
0 comments:
Post a Comment