safari ios 7 and django app - function not being called to serve video

134 views
Skip to first unread message

Adam Teale

unread,
Jun 3, 2014, 9:21:23 PM6/3/14
to django...@googlegroups.com
Hi Guys,

I am in the process of building a web app with django.
The app is running on apache and files/videos are served with the xsendfile apache module.
The app is working fine on iphones, ipads and macs on the local network - when I access the site via a url like https://myapp.local

When I visit the app through it's real world domain (https://myapp.com) via a computer everything is ok too.
But when on the iPhone/ipad the videos do not get loaded. The custom url I have made for serving the videos isn't even called.

I am embedding the videos like this:
<video src="/serveAsset/{{ asset.asset.id }}" width=100% height:auto preload="metadata" autostart="False" controls></video>

So the url is called to grab that asset and return the file response with the path.
This 'serveAsset' doesn't get called from the iPhone/iPad.
When I hit that url directly the video doesn't load either.
(But it does from a mac and safari - including using the "Safari iOS7 - iPhone" User agent.

Does Safari iOS7 not work with urls that serve material for the page?

Any ideas what might be going on?

Any help would be very much appreciated!

Cheers

Adam

Ilya Kazakevich

unread,
Jun 5, 2014, 1:17:31 PM6/5/14
to django...@googlegroups.com
Hello,

1) Use FireBug (http://www.hongkiat.com/blog/installing-firebug-browsers-ios/) to check generated HTML for correct link and HTTP request your browser sends/receives
2) Check your web server logs to ensure Safari tries to load video (you need access log and error log I believe: http://httpd.apache.org/docs/2.2/logs.html )
3) NEVER hardcode urls! Use URL tag (https://docs.djangoproject.com/en/dev/ref/templates/builtins/#url)


Ilya Kazakevich,
JetBrains PyCharm (Best Python/Django IDE)
http://www.jetbrains.com/pycharm/
"Develop with pleasure!"
>--
>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.
>To post to this group, send email to django...@googlegroups.com.
>Visit this group at http://groups.google.com/group/django-users.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/django-users/62927890-40aa-47d6-84cb-0c
>26bd5285f6%40googlegroups.com
><https://groups.google.com/d/msgid/django-users/62927890-40aa-47d6-84cb-0
>c26bd5285f6%40googlegroups.com?utm_medium=email&utm_source=footer> .
>For more options, visit https://groups.google.com/d/optout.


Adam Teale

unread,
Jun 5, 2014, 2:33:50 PM6/5/14
to django...@googlegroups.com
Thanks for your suggestions Ilya. 

From the apache side of things my serveAsset function is not called when the page is viewed from an iPhone/iPad. But it works fine from a browser on a computer. 

I changed to using the URL tag.

I really can't work it out at the moment.
I wonder if it is some configuration on the mac os x server that is running the django app related to mobile devices? 


--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/u_zJ8Pc4Eyg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

Adam Teale

unread,
Jun 5, 2014, 2:47:02 PM6/5/14
to django...@googlegroups.com
Ahhhhhhhhhh i just worked out the issue.

The server is using SSL certification (https?) and for some reason on the iphone/ipad the serveAsset was not being called.

So now to work out how to call the URL tag with SSL.

Cheers!

Ilya Kazakevich

unread,
Jun 5, 2014, 3:00:30 PM6/5/14
to django...@googlegroups.com
What algorithm is used for keys in HTTPS on your installation?
AFAIK, Safari@iOS does NOT support DSA keys (only RSA keys are supported).
><mailto:django-users%2Bunsu...@googlegroups.com> .
> >To post to this group, send email to django...@googlegroups.com.
> >Visit this group at http://groups.google.com/group/django-users.
> >To view this discussion on the web visit
>
> >https://groups.google.com/d/msgid/django-users/62927890-40aa-47d6-84
>cb-0c
> >26bd5285f6%40googlegroups.com
>
>
> ><https://groups.google.com/d/msgid/django-users/62927890-40aa-47d6-8
>4cb-0
>
> >c26bd5285f6%40googlegroups.com?utm_medium=email&utm_source=fo
>oter> .
>
> >For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> You received this message because you are subscribed to a topic in the
>Google Groups "Django users" group.
> To unsubscribe from this topic, visit
>https://groups.google.com/d/topic/django-users/u_zJ8Pc4Eyg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
>django-users...@googlegroups.com
><mailto:django-users%2Bunsu...@googlegroups.com> .
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
>
> To view this discussion on the web visit
>https://groups.google.com/d/msgid/django-users/048d01cf80c0%246852d990%
>2438f88cb0%24%40JetBrains.com.
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>--
>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.
>To post to this group, send email to django...@googlegroups.com.
>Visit this group at http://groups.google.com/group/django-users.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/django-users/CAMse0ZiGOCoP5tHJoPQCQ5g
>DSMMkTknwA8hWnae_VqMqat78Eg%40mail.gmail.com
><https://groups.google.com/d/msgid/django-users/CAMse0ZiGOCoP5tHJoPQCQ5
>gDSMMkTknwA8hWnae_VqMqat78Eg%40mail.gmail.com?utm_medium=email
Reply all
Reply to author
Forward
0 new messages