HTML video seek problem in django

868 views
Skip to first unread message

Manjunatha L Naik

unread,
Jan 10, 2018, 7:26:49 AM1/10/18
to Django users

Hii,

 

When load video from Django app, the video seeking(forward and backward) is not possible with chrome browser. It works fine with IE and Mozilla Firefox.. Please help me out.

 

Thanks,

Julio Biason

unread,
Jan 10, 2018, 8:30:42 AM1/10/18
to django...@googlegroups.com
Hi Manjunatha,

Django just serves the content, it doesn't handle how it will be played. It could be a problem with your player, or some JS error -- in other words, nothing to do with Django itself.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/57db425c-e1fc-406d-85df-570a512751a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Julio Biason, Sofware Engineer
AZION  |  Deliver. Accelerate. Protect.
Office: +55 51 3083 8101  |  Mobile: +55 51 99907 0554

Manjunatha

unread,
Jan 10, 2018, 9:57:35 PM1/10/18
to Django users
Hi Julio  Biason,

I have not added any javascript, I downloaded the video from youtube and put it in inside Django folder. In the HTML <video> tag I gave the path of the link. The video is playing but not forward and backward feature. It's only in Chrome browser.

Regards,
Manjunatha,


On Wednesday, 10 January 2018 19:00:42 UTC+5:30, Julio Biason wrote:
Hi Manjunatha,

Django just serves the content, it doesn't handle how it will be played. It could be a problem with your player, or some JS error -- in other words, nothing to do with Django itself.
On Wed, Jan 10, 2018 at 8:03 AM, Manjunatha L Naik <mlnai...@gmail.com> wrote:

Hii,

 

When load video from Django app, the video seeking(forward and backward) is not possible with chrome browser. It works fine with IE and Mozilla Firefox.. Please help me out.

 

Thanks,

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

Manjunatha

unread,
Jan 10, 2018, 10:34:55 PM1/10/18
to Django users
Hi Julio Biason,

I have attached one image please go through that, actually in my case status code returns 200. Please help me out.

Thanks,
Manjunatha
video_problem.JPG

Kasper Laudrup

unread,
Jan 11, 2018, 4:32:16 AM1/11/18
to django...@googlegroups.com
Hi Manjunatha,

On 2018-01-11 05:34, Manjunatha wrote:
> I have attached one image please go through that, actually in my case
> status code returns 200. Please help me out.
>

Does your server understand "partial content requests" as descriped in
the Stackoverflow post you posted a screenshot of?

Kind regards,

Kasper Laudrup

Manjunatha

unread,
Jan 11, 2018, 4:47:52 AM1/11/18
to Django users
Hi Kasper,

No. The server gives 200 OK status code. But I can't see partial content server. Please help me to change status code 200 to 206.

Thanks, 
Manjunatha 

Kasper Laudrup

unread,
Jan 11, 2018, 5:22:15 AM1/11/18
to django...@googlegroups.com
Hi Manjunatha,

On 2018-01-11 11:47, Manjunatha wrote:
> Hi Kasper,
>
> No. The server gives *200 OK *status code. But I can't see partial
> content server. Please help me to change status code 200 to 206.
>

You should look into the documentation for the web server you are using.

If the web server gives the wrong status code (200 instead of 206) you
should probably open an issue with the maintainers of the web server.

Kind regards,

Kasper Laudrup

Manjunatha

unread,
Jan 11, 2018, 5:33:51 AM1/11/18
to Django users
Hi Kasper,

I am using django python framework. Currently I am working on localhost 127.0.0.1:8000. There is no forum for django. Is there any suggestion from your side to solve this problem.

Thanks,
Manjunatha

Kasper Laudrup

unread,
Jan 11, 2018, 5:49:19 AM1/11/18
to django...@googlegroups.com
Hi Manjunatha,

On 2018-01-11 12:33, Manjunatha wrote:
> I am using *django python* framework. Currently I am working on
> localhost 127.0.0.1:8000. There is no forum for django. Is there any
> suggestion from your side to solve this problem.
>

So the problem is only showing up during development?

I would personally think it's a minor issue then, as long as it works on
Chrome in production you can just use other browsers during development
(or simply ignore the issue).

Could very well be that the simple web server Django uses doesn't
support all the features of HTTP. I would suggest writing a very simple
test case showing the problem and then open an issue with the Django
maintainers to see if they want to do something about it or, even
better, write a patch to fix it yourself and see if it gets accepted.

I'm not a Django maintainer and don't know much about the internals of
Django so I'm afraid I cannot help you any further.

Kind regards,

Kasper Laudrup

Manjunatha

unread,
Jan 11, 2018, 7:02:07 AM1/11/18
to Django users
Hi Kasper Laudrup,

Thank you very much for your advice.

Regards,
Manjunatha

Jason

unread,
Jan 11, 2018, 8:13:16 AM1/11/18
to Django users
An alternative is to use the django extensions runserverplus which uses the Werkzeug debugger.  As you can see in this post on django-developers, this is used as an alternative.

Regardless, I think the primary issue is you're serving the content in an inappropriate manner.  Django should be used for dynamic requests, and static files should be handled by an Apache or Nginx webserver that serves up the static files and passes the dynamic requests to Django via mod_wsgi or Gunicorn.

Manjunatha

unread,
Jan 18, 2018, 10:46:20 PM1/18/18
to Django users
Hi Jason,

Thanks for your suggestion. I found a solution for the Video seek problem in django.
Make some changes in django/views/static.py. 

Regards,
Manjunatha

Jason

unread,
Jan 19, 2018, 6:51:12 AM1/19/18
to Django users
Nice find!  Wonder why that author never made a PR to the django project?  

Jason

unread,
Jan 19, 2018, 6:56:29 AM1/19/18
to Django users
After a bit more digging, there's a thread on the django-developers google group:


Apparently that patch developer never followed up.  
Reply all
Reply to author
Forward
0 new messages