HTML5 Video Player Problem
Hi,
We use Sitefinity HTML5 video player on one of our pages and it is set to auto play mode. The problem is that when clicking on another page we get the following pop-up message: "A network error caused the video download to fail part-way". This happens in Chrome.
Any suggestions?
Thanks
Anyone? This is rather urgent issue for us.
Thanks
Hi Igor,
We have experienced the issue before and it is actually caused when a video is set to play, however, another page is opened before the video is actually streamed and started to play. Could you please try setting your videos and player as suggested in this documentation article and let me know the result.
Regards,
Nikola Zagorchev
Telerik
Hi Nikola,
Thanks for your response. I followed the article and set up everything according to it, but still no success - the issue still exists.
Any other suggestions?
Hi Nikola,
Can you please provide me with an update? This is very urgent.
Thanks
Hello Igor,
Could you please tell us the Sitefinity version you are using? I tested on Sitefinity 7.1 and Chrome latest version and could not reproduce the issue, with and without auto play. Furthermore, full steps to reproduce will be very helpful for us, to investigate the issue.
Regards,
Nikola Zagorchev
Telerik
Hi Nikola,
We are on Sitefinity 7. You may check the issue on the staging server - qfba-test. gulfstaging. net.
Autoplay is turned off now and you need to play the video to reproduce the issue.
Thanks
Hello Igor,
This behavior is Chrome browser specific and I can't really tell whether they have logged it in their trackers. It results when the video is not fully loaded and is being still streamed and is navigated out of the page. You can find what throws the exception and more information here. To overcome the issue, you can try to map the video player template and add the following script:
window.onbeforeunload = function ()
var player = $find('<%= mediaPlayer.ClientID %>');
player.stop();
;
<%@ Control Language="C#" %>
<%@ Register TagPrefix="sitefinity" Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
<
sitefinity:SitefinityLabel
id
=
"title"
runat
=
"server"
WrapperTagName
=
"h2"
HideIfNoText
=
"true"
HideIfNoTextMode
=
"Server"
CssClass
=
"sfmediaFieldTitle"
/>
<
div
id
=
"playerContainer"
class
=
"sfPlayerWrp"
runat
=
"server"
>
<
telerik:RadMediaPlayer
ID
=
"mediaPlayer"
runat
=
"server"
AutoPlay
=
"false"
FullScreen
=
"false"
Width
=
"640px"
Height
=
"360px"
Skin
=
"Default"
>
<
PlaylistSettings
Mode
=
"Buttons"
ButtonsTrigger
=
"Hover"
Position
=
"Vertical"
/>
</
telerik:RadMediaPlayer
>
<
div
id
=
"unableToPlayVideo"
runat
=
"server"
class
=
"sfPlayerError"
style
=
"display: none;"
>
<
div
class
=
"sfPlayerErrorWrp"
>
<
span
class
=
"sfPlayerErrorImg"
></
span
>
<
sitefinity:SitefinityLabel
ID
=
"unableToPlayVideoLabel"
CssClass
=
"sfPlayerErrorMsg"
WrapperTagName
=
"p"
Text="<%$Resources:VideosResources, UnableToPlayVideo %>" runat="server" />
</
div
>
</
div
>
</
div
>
<
sf:BrowseAndEditToolbar
ID
=
"MediaPlayerBrowseAndEditToolbar"
runat
=
"server"
Mode
=
"Edit"
></
sf:BrowseAndEditToolbar
>
Thanks Nikola!
We modified the script a bit and it resolved the issue.
Hello Igor,
I am glad you have managed to resolve the issue. Write back to us if we can assist further.
Regards,
Nikola Zagorchev
Telerik