2

my code:

<video width="600" height="400" controls="controls">
 <source src="uploads/video/patientenhandset_uk_high.mp4" type="video/mp4" />
 <source src="uploads/video/patientenhandset_uk_high.ogg" type="video/ogg" />
 Your browser not supported this video.
</video>

This code IE10, IE9, firefox and opera works. So why does not work in chrome?

Gökhan YILDIZ
  • 131
  • 3
  • 16
  • Define "not work". What messages are reported on the console? What requests show up in the Net tab? What content-type does your server return for the video? – Quentin May 21 '13 at 14:55
  • I have found that some browsers were having issues with relative sources, so I long ago switched to putting in FQDNs for source. It may have been fixed by now, but a similar set of code is still working for me in chrome. It could be an invalid mime type your web server is sending, maybe. – Robert McKee May 21 '13 at 15:07

2 Answers2

1

I believe Chrome uses the WebM format (video/webm), so you'll probably need to offer this as another <source> alternative.

Matt Asbury
  • 5,644
  • 2
  • 21
  • 29
  • 2
    Chrome supports mp4 and ogg as well as webm. – Quentin May 21 '13 at 14:54
  • I know it is supposed to @Quentin but I've had similar issues in the past with this exact thing and only by offering all 3 formats did it begin to work reliably (as in this case ;) ). By default you should offer all 3 formats anyway for cross browser / device coverage. – Matt Asbury May 21 '13 at 19:33
  • @Quentin chrome does not seem to support mpeg4-visual http://stackoverflow.com/a/12174154/801203 which may be inside mp4. Why people downvote this at least partially correct answer?! – Ayrat Oct 12 '15 at 16:54
0

That code looks fine. Are you serving the right mime type for mp4?

The latest chrome plays HTML5 video fine, so you have something wrong, but it doesn't appear to be in your HTML. You may also want to try switching your source tags to using a fully qualified domain name, like http://www.yourdomain.com/yourvideo.mp4

Robert McKee
  • 21,305
  • 1
  • 43
  • 57