This is a migrated thread and some comments may be shown as answers.

Failed To Open Media

3 Answers 415 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 30 Aug 2010, 02:00 AM
Telerik,

I've developed a SharePoint web part using the MediaPlayer web part.  I am additionally using a web service to read a SharePoint list and load the playlist based upon files in the SharePoint list.  This "seems" to work, however, when attempting to play any of the files, I get "Failed to open media."  Is there any way to establish what this message actually means?  Or what is triggering it?

Thanks!

3 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 01 Sep 2010, 02:12 PM
Hello Paul,

Basically RadMediaPlayer is a wrapper around Silverlight's MediaElement. The "Failed to open media." error is a generic error and the causes for it can be numerous, ranging from unsupported file format (all the supported formats you can find here) to cross domain issue. Try narrowing down the cause for the issue and sharing the information with us. This way we will be better able to assist you.

Best wishes,
Kiril Stanoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Paul
Top achievements
Rank 1
answered on 22 Sep 2010, 08:00 PM
To give a little more information...

I've developed the Silverlight MediaPlayer as a MOSS 2007 web part.  Getting the web part to display in SharePoint was easy.  Getting the play list to populate has not been.

The hope was that users could load files to a shared drive, and the MediaPlayer would be able to read these files, load the play list and play them when a MediaElement is selected.  I created a web service to get the shared drive urls, which required impersonation, and now the play list loads correctly.  The problem is now, whenever a MediaElement is click upon, you get the extremely helpful "Failed to Open Media!" message.  Without really being able to dig into this error message I would "guess" that although we were able to load items in the play list via a web service (which used impersonation), the Silverlight MediaPlayer does not actually have permissions to read from the shared drive location and thus cannot actually play the media item.  Is this supposition correct?  Is there any way to get the MediaPlayer to play files from a shared drive? 

Thanks in advance
0
Miro Miroslavov
Telerik team
answered on 28 Sep 2010, 09:16 AM
Hello Paul,

 You run into Cross-Schema issue - which means that you are trying to open Media from http to local file share, which is forbidden in Silverlight. (Read the full msdn article).  That's why you get "Network error".
You can debug your media exceptions if you handle the MediaElement.MediaFailed exception.

void MediaItem_Loaded(object sender, RoutedEventArgs e)
{
    media.MediaElement.MediaFailed += new EventHandler<ExceptionRoutedEventArgs>(MediaElement_MediaFailed);
}
 
void MediaElement_MediaFailed(object sender, ExceptionRoutedEventArgs e)
{
}

If we can be of further help, please let us know.

All the best,
Miro Miroslavov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
MediaPlayer
Asked by
Paul
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Paul
Top achievements
Rank 1
Miro Miroslavov
Telerik team
Share this question
or