Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JW Player Error loading media: File could not be played

We ran into a very strange problem with JW Player and really don't know an approach to solve it.

JW Player shows the error:

Error loading media: File could not be played

sporadically across all browsers and platforms (sometimes it shows up and sometimes not). It took me over 30 reloads to get it and some of my colleagues got it with their first try. It's behavior is very inconsistent and kind of random.

We're using FirstSpirit as CMS on an Apache Tomcat instance running on Windows server. The problem occurred on Chrome, IE and Firefox across all versions.

The MIME types of all videos are correct as their codecs are. If supported, JW Player is running in HTML5 mode. We use Flash only for older browsers (IE8 groan).

I would appreciate any help. Thanks!

Marcus


UPDATE: Example page with video box on the right side. Example page with video

UPDATE: We updated the version as Ethan from JW Player suggested, but it's still not working properly.

like image 634
Marcus Rommel Avatar asked Jun 08 '15 21:06

Marcus Rommel


People also ask

Why JW Player is not working?

To fix JW player not working in Chrome, open settings after clicking on the three dot icon at the right, then choose Advanced. Fetch for Reset settings by scrolling down, It will ask for confirmation. Click on YES. Then restart your Chrome after this process gets complete.

Why does it say this video file Cannot be played?

The video cannot be played error is more common in streaming services like Amazon Prime, Hulu, Netflix, YouTube, and so on. It usually happens due to an internal problem with the browser. If you cannot play a video due to this, then just consider clearing the browser's cache.


1 Answers

I would suggest to encode the video in .mp4 and .ogg. (MP4 is supported in Safari and IE9, Ogg in Firefox, Chrome and Opera and as you mentioned IE6-8 uses flash only). Thus your video element will look something like:

<video width="300" controls>
  <source src="my_video.ogg" type="video/ogg">
  <source src="my_video.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>

This will ensure that the video will be played if the browser support HTML5. I hope this helps

like image 144
Svetoslav Petrov Avatar answered Sep 16 '22 16:09

Svetoslav Petrov