Question

I have a bunch of html5-video's on my page that where I only preload the metadata. With Javascript I then load the videos (videoElement.load();).

This seems to cause IE9 to crash...

IE10 & 11 don't crash, but half of the movies aren't loaded correctly. All the videos do return the canPlayTrough event, witch confuses me more.

Anyone an idea?

Was it helpful?

Solution

To help you debug I strongly suggest using the following, recommended by the MSDN blog.

document.getElementsByTagName("video")[0].error.code

http://blogs.msdn.com/b/thebeebs/archive/2011/07/20/html5-video-not-working-in-ie9-some-tips-to-debug.aspx

MEDIA_ERR_ABORTED : 1

The fetching process for the media resource was aborted by the user.

MEDIA_ERR_DECODE : 3

An error has occurred in the decoding of the media resource, after the resource was established to be usable.

MEDIA_ERR_NETWORK : 2 A network error has caused the user agent to stop fetching the media resource, after the resource was established to be usable

MEDIA_ERR_SRC_NOT_SUPPORTED : 4 The media resource specified by src was not usable.

We can't really debug this for you if we don't have the code you are using, or the files you are trying to display. The above, however, should be able to tell you what is going wrong.

== Edit to extend ==

If you are having issue #3, you are likely breaking IE's memory management. What is likely happening is that IE is attempting to pre-load the videos into memory and then crashes when resources run out. You can fix this by destroying the video elements as they are no longer needed, and turning off preloading.

OTHER TIPS

The crash must be because IE sucks. If some of the videos dont load it might be that the browser dont support the encoding. You need to send the files with the correct MIME type end encode the video with a supported encoding. If you give a link to the page i might be able to figure out whats wrong.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top