An error occurred while attempting to play the video.

Topics: HTML5 web
Jan 13, 2012 at 12:09 AM

The "An error occurred while attempting to play the video." error message appears in HTML5 playback from time to time even when there is no problem playing the video - any work around for this problem?

Jan 13, 2012 at 12:18 AM

Hi Leo,

What browser are you seeing this behavior in? Does the error message pop up when playback begins or after playback begins?

Thanks,

James

Jan 13, 2012 at 12:19 AM

IE9 and WIndows 7. The error message appears before playback.

Feb 28, 2012 at 12:16 PM

I am seeing the same behavior with IE9 & Windows 7 (it appears at random).  When the page loads there is an error message but if you click on the white part of the play button the video will play behind the error message.  The pf-play-overlay-control is not clickable.

Does anyone know of a fix or workaround?

Feb 29, 2012 at 12:10 PM

It looks like the NetworkState is changing and is causing this message.  It changes from from NETWORK_NO_SERVICE to NETWORK_LOADING but the error message doesn't go away.

Mar 6, 2012 at 9:42 PM

Do we have a workaround for this issue? I also have this behaviour.

Mar 12, 2012 at 11:28 AM

We decided to hide the error message when this occurs.

    onNetworkStateChange: function () {
        !this.element && this.player.networkState() === PlayerFramework.VideoMediaPlugin.NetworkState.NETWORK_NO_SOURCE && this.show(this.options.defaultMessage)
    }, 
    show: function (a) {
//    window.setTimeout(PlayerFramework.proxy(this, function () {
//        this.element = PlayerFramework.createElement(this.player.containerElement, ["div", { "class": "pf-error-message-control" }, ["div", { "class": "pf-error-message-container" },
//a]])
//    }), 500)
}

Developer
Apr 13, 2012 at 3:53 PM

This issue has been addressed in the latest build. IE9 was showing an error message in certain "recoverable" situations, so the player now detects those situations and no longer shows an error.

We will post a new release on CodePlex with this fix and more very soon.