0

I have an application in django. I have uploaded a video which is playing perfectly fine in all the browser except for safari.

Configuration for media files in settings.py is as

MEDIA_ROOT = os.path.join(BASE_DIR,'media_root')
MEDIA_URL = '/media_root/'

Url which i am testing is http://admin.newsyoucantuse.in/media_root/blog/videos/sample_video_sample_video_SampleVideo_1080x720_2mb.mp4

I have gone through a lot of solutions but didn't understand what exactly is the issue,

daemon
  • 113
  • 3
  • 14
  • If the video plays fine for other browsers then it's not a django issue but a HTML/js/css/whatever frontend issue with Safari (=> django & python tags removed). – bruno desthuilliers Aug 02 '18 at 09:30
  • @brunodesthuilliers then what's the issue. If it's an css/js/html issue then how it is working in mozilla and chrome. have you checked the url it's a video path. There must be something which needs to be configured in django settings file. – daemon Aug 02 '18 at 09:47
  • 1
    You must be really new to web programming for asking such a question . Browsers compatibility issues are as old as the world wide web, and are the bane of front-end developpers. And it's only an issue between different browsers but also between different versions of the same browser... – bruno desthuilliers Aug 02 '18 at 09:52
  • @brunodesthuilliers yes i'm new to python. i have tried another video from different server and it is running perfectly fine. that's why i have asked a question here. – daemon Aug 02 '18 at 09:57
  • Once again, if the same works in other browsers then is NOT a python problem and you'd get the very same issue with a fully static website. When I said "new to web programming" I was refering to the front end part, not programming in general. – bruno desthuilliers Aug 02 '18 at 10:00

1 Answers1

0

I resolved the issue by changing the environment to production in app_name/settings.py file.

Now it is working.

daemon
  • 113
  • 3
  • 14