Videos play on dev system but not from server

2 posts, 0 answers
  1. GEB
    GEB avatar
    228 posts
    Member since:
    Dec 2008

    Posted 17 Jul 2009 Link to this post

    I have implemented a simple SL3 app using the RadMediaPlayer.  I am placing the videos in the ClientBin directory on the VS2008 development system, as well as the server.  I am referencing these videos in the XAML as a relative path (see XAML below).  The videos play fine on the development system, but do not play on the production system.

    Do the source strings for the videos have to be a URL?  If so, how can the URL be relative to the production web site so that I don't have to hardocde the URL?

    <UserControl x:Class="TestApp.ViewVideoTutorialWindow" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.MediaPlayer" 
        Width="800" Height="600">  
     
        <Grid x:Name="LayoutRoot" Background="Gray">  
            <telerik:RadMediaPlayer AutoReverse="True" x:Name="RadMediaPlayer1" IsPlaylistVisible="True">  
                <telerik:RadMediaItem Source="/myvideo1.mp4" 
                                      ImageSource="/MyApp;component/Images/Icons/myvideo1.png"   
                                      Title="First Video" 
                                      Description="This is the first video.">  
                </telerik:RadMediaItem> 
            </telerik:RadMediaPlayer> 
        </Grid> 
    </UserControl> 
     
  2. GEB
    GEB avatar
    228 posts
    Member since:
    Dec 2008

    Posted 17 Jul 2009 Link to this post

    I was able to find the problem.  It turns out that IIS7 does not have a default mime entry for .mp4 files.  On the production system, I added the .mp4 mime entry, and now the videos are being played appropriately.  I was able to use the Souce="/myvideo.mp4" format, and the videos were published to the /ClientBin directory on the Web Server, so that they would be streamed when selected by the user, rather than embedding them in the XAP file.
  3. DevCraft banner
Back to Top