HTML5 <video> element non-seekable on local Django server, works fine on my website.

526 views
Skip to first unread message

Orestes

unread,
Dec 27, 2010, 7:47:41 AM12/27/10
to PyWeb-IL, yehonat...@gmail.com, ahi...@gmail.com, udi...@gmail.com
Hey everyone.

I've got a Django app serving a webpage with an HTML5 <video> element.
There's a wierd "feature", turning the video element to be non-
seekable: video.seekable returns a timeRanges object with length 0,
whereas it should be 1.

This means I can't edit the video. JavaScript can't do anything
either.

The thing is, when I upload the problematic webpage, statically - no
Django, just plain HTML/JS/CSS - to my website on WebFaction.com, it
works fine. Trying to serve the same static page on my Django dev
server still gives the same problem.

I am using Django's static serving for dev/debug purposes -
http://docs.djangoproject.com/en/1.2/howto/static-files/

Do you have any idea what is causing this, or how can I fix it?

Thanks,
Ory

Ori Peleg

unread,
Dec 27, 2010, 10:11:02 AM12/27/10
to pywe...@googlegroups.com
Have you tried working locally with apache / lighttpd / etc?
Django's dev static serving probably doesn't support HTTP byte range requests.


--
You received this message because you are subscribed to the Google Groups "PyWeb-IL" group.
To post to this group, send email to pywe...@googlegroups.com.
To unsubscribe from this group, send email to pyweb-il+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyweb-il?hl=en.




--
Check out my blog: http://orip.org

Orestes

unread,
Dec 28, 2010, 8:11:09 PM12/28/10
to PyWeb-IL
That did the trick.

Thank you very much.

+1 on http://stackoverflow.com/q/4538810/207894 :)

For anyone who wants to know, I edited the original static serving
example in Django's docs, in urls.py to:

urlpatterns += patterns('django.views.generic.simple',
(r'^static/(?P<path>.*)$',
'redirect_to',
{'url': http://my_url/%(path)s'}),

On Dec 27, 5:11 pm, Ori Peleg <ori...@gmail.com> wrote:
> Have you tried working locally with apache / lighttpd / etc?
> Django's dev static serving probably doesn't support HTTP byte range
> requests.
>
> http://www.bluishcoder.co.nz/2010/04/27/html5-video-seeking-and-redir...
>
>
>
>
>
>
>
>
>
> On Mon, Dec 27, 2010 at 2:47 PM, Orestes <oryb...@gmail.com> wrote:
> > Hey everyone.
>
> > I've got a Django app serving a webpage with an HTML5 <video> element.
> > There's a wierd "feature", turning the video element to be non-
> > seekable: video.seekable returns a timeRanges object with length 0,
> > whereas it should be 1.
>
> > This means I can't edit the video. JavaScript can't do anything
> > either.
>
> > The thing is, when I upload the problematic webpage, statically - no
> > Django, just plain HTML/JS/CSS - to my website on WebFaction.com, it
> > works fine. Trying to serve the same static page on my Django dev
> > server still gives the same problem.
>
> > I am using Django's static serving for dev/debug purposes -
> >http://docs.djangoproject.com/en/1.2/howto/static-files/
>
> > Do you have any idea what is causing this, or how can I fix it?
>
> > Thanks,
> > Ory
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PyWeb-IL" group.
> > To post to this group, send email to pywe...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > pyweb-il+u...@googlegroups.com<pyweb-il%2Bunsubscribe@googlegroups.c om>
> > .
Reply all
Reply to author
Forward
0 new messages