Failed to open media! when run on web

2 posts, 0 answers
  1. Varakorn Klaiklang
    Varakorn Klaiklang avatar
    1 posts
    Member since:
    Sep 2009

    Posted 18 Feb 2011 Link to this post

    I use this code and use F5 for test output it work as normal like picture "P2" but i copy folder SilverlightIntro.Web to my web site it error was appare like picture "P3". could you give me some advice please?

    <

     

     

    UserControl x:Class="SilverlightIntro.MainPage"

     

     

     

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

     

     

     

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

     

     

     

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

     

     

     

    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

     

     

     

    mc:Ignorable="d"

     

     

     

    d:DesignHeight="300" d:DesignWidth="400" BorderThickness="10" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">

     

     

     

     

    <telerik:RadMediaPlayer Name="radMediaPlayer1">

     

     

    <

     

     

    telerik:RadMediaItem Source="http://www.itknowledgesale.com/wmv/sql2008r2.wmv"/>

     

     

     

     

    </telerik:RadMediaPlayer>

     

     

    </

     

     

    UserControl>

     

  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 23 Feb 2011 Link to this post

    Hi Varakorn Klaiklang,

    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. You can debug your media exceptions if you handle the MediaElement.MediaFailed exception.
    void MediaItem_Loaded(object sender, RoutedEventArgs e)
    {
        radMediaPlayer.MediaElement.MediaFailed += new EventHandler<ExceptionRoutedEventArgs>(MediaElement_MediaFailed);
    }
      
    void MediaElement_MediaFailed(object sender, ExceptionRoutedEventArgs e)
    {
    }
    This way we will be better able to assist you.

    Best wishes,
    Tina Stancheva
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft banner
Back to Top