Failed To Open Media

4 posts, 0 answers
  1. Paul
    Paul avatar
    4 posts
    Member since:
    Jun 2010

    Posted 29 Aug 2010 Link to this post

    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!
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 01 Sep 2010 Link to this post

    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
  3. DevCraft banner
  4. Paul
    Paul avatar
    4 posts
    Member since:
    Jun 2010

    Posted 22 Sep 2010 Link to this post

    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
  5. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 28 Sep 2010 Link to this post

    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
Back to Top