"The video failed to play" message

Topics: Windows 8 Xaml
May 23, 2012 at 8:09 AM

Hello,

Is there a possibility to change the default message shown when the video failed?

Greetings,

Krzysztof

Coordinator
May 23, 2012 at 2:33 PM

Krzysztof, there are 3 options:

1) you can localize the text by creating a new resource file with updated strings. (recommended for localization)

2) you can re-style the ErrorView control with your own Xaml. (recommended for modifications to visual aspects of the error screen)

3) you can disable the error plugin and build your own. (recommended for modifications to visual aspects and behaviors of the error screen)

Let me know if you need pointers on how to accomplishing one of these,

Tim

May 24, 2012 at 10:56 AM

Hi,

Thank You for the response. I would like to display various error messages, based on error codes returned by custom rights manager. Would the first approach be sufficient? I don't plan to change the visual aspects. How can I set the displayed message programmatically?

 

Greetings,

Krzysztof

Coordinator
May 31, 2012 at 2:52 PM

I'd recommend grabbing the error plugin and view from source code and modifying it to expose the error text as a string property (which you can then set from code). You can programmatically swap yours for the default instance by adding/removing from the plugins collection to prevent them from competing with one another. I'll also take a look at exposing the error text property in a future release to make this simpler.

Thanks for the feedback, Tim

Oct 10, 2012 at 11:12 AM

Hello,

Is the text message exposed in current release? I would also like to know if there is a possibility to localize player related strings (seek, mute and so on) in a .resw file without having to build the player from source.

Greetings,

Krzysztof

Coordinator
Oct 10, 2012 at 3:40 PM

Hi Krysztof, this feature will be in the next version (tentatively targeted for 10/26).

Tim

Apr 9, 2013 at 11:37 AM
Hi Tim, I have also been grappling with this in order to notify the user of network errors (this seems to be a must for win 8 app submission).

I hijacked the media failed event and updated the error text using:
var errorPlugin = mediaPlayer.Plugins.OfType<ErrorPlugin>().First();
errorPlugin.ErrorText = "You need to have a network connection in order to access the video";
However, I found that on retry the video restarts rather than resuming. I worked around this by hiding the media player on mediaFailed, showing a similar screen (this is useful as the snapped view of the mediaplayer's error view doesn't scale) and then create a button event which will hide the error, show the media player and call the media player's Retry method.

Is there a simpler or more elegant solution that I am missing?