1

I have a private website that hosts training videos using the HTML5 video tag and the video.js plugin. It was working in Chrome/Firefox/Safari up until last Spring, but now the videos no longer work in Safari. They work fine in Chrome and Firefox. I upgraded to the latest video.js v4.12 and v5 but that has not helped. You can view the broken code on this test page.

http://dev.investja.org/videojs_problem2.html

When you open the page and click on the video it works fine in Chrome and Firefox but not Safari.

Any help would be greatly appreciated!

Thanks

Craig Nakamoto
  • 2,075
  • 2
  • 18
  • 19
  • If the headers from server come different than the file extension, then the browser may have problems in rendering it. For example, if you want to render a file from http://.../some_name.mp4 and the "Content-Type" header comes "video/mpeg" and not "video/mp4", then the video may be considered corrupted. (happened to me on IE11) – Victor Feb 08 '19 at 15:11

2 Answers2

1

It also doesn't play in a regular HTML5 video element in Safari: http://output.jsbin.com/rologupuko

The Content-Type header is stating an incorrect mime type. It should be video/mp4. That's enough to break playback in some browsers, try fixing that.

curl -I http://dev.investja.org/virtual/download/10/mp4/JA_Video
HTTP/1.1 200 OK
Date: Fri, 02 Oct 2015 09:42:56 GMT
Server: Apache/2.2.29 (Unix)
X-Powered-By: PHP/5.5.29
Content-Disposition: attachment; filename="JA ISP Lesson 03 Video 03-720p.mp4"
Content-Length: 42346342
Cache-Control: max-age=2592000, public
Expires: Sun, 01 Nov 2015 09:42:56 GMT
X-UA-Compatible: IE=Edge,chrome=1
Connection: close
Content-Type: application/mp4
misterben
  • 7,455
  • 2
  • 26
  • 47
  • Turns out this was my issue, thank for pointing out! I wrote a similar comment regarding this issue: https://stackoverflow.com/a/6780676/3997521 – petrosmm Jul 20 '19 at 19:57
0

Try to use in js code:

var myVideo = videojs(videoEl, { controls: true }); 

and remove сontrols from you html code. ,

Nic3500
  • 8,144
  • 10
  • 29
  • 40