How do I stream videos from web server in ExpressionMediaPlayer control?

Posted by Nick on Stack Overflow See other posts from Stack Overflow or by Nick
Published on 2010-03-30T03:10:22Z Indexed on 2010/03/30 3:13 UTC
Read the original article Hit count: 415

Hello.

I would like to stream videos that reside at the webserver from within a ExpressionMediaPlayer control. The following results in a network error. I believe that the problem is with my Uri. I have the videos inside the 'ClentBin' folder. Can anyone tell me how this is done?

private void videoList_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
             var selectedVideo = (Video)videoList.SelectedItem;        
             PlaylistItem item = new PlaylistItem();
            item.MediaSource = new Uri(@"/ClientBin/" + selectedVideo.FilePath,         UriKind.RelativeOrAbsolute);
            item.IsAdaptiveStreaming = false;
            ep.Playlist.Items.Add(item);
         }

Thanks!

© Stack Overflow or respective owner

Related posts about silverlight-3.0

Related posts about expression-blend