Skip to main content

Microsoft Silverlight

Answered Question Cannot play local WMV file with ExpressionMediaPlayerRSS Feed

(0)

mpalmer.sps
mpalmer.sps

Member

Member

1 points

12 Posts

Cannot play local WMV file with ExpressionMediaPlayer

Trying to play an item in the 'new' ExpressionMediaPlayer control and getting nowhere fast...

XAML:

namespace:

xmlns:ExpressionMediaPlayer="clr-namespace:ExpressionMediaPlayer;assembly=MediaPlayer"

control markup:

<ExpressionMediaPlayer:MediaPlayer x:Name="ctrlExpressionMedia1" Margin="8" Height="600" Width="800" />

codebehind: 
try {
ExpressionMediaPlayer.PlaylistItem playItem = new ExpressionMediaPlayer.PlaylistItem();Uri videoSource = new Uri("SuperSpeedway.wmv", UriKind.Relative);

playItem.MediaSource = videoSource;

ctrlExpressionMedia1.Playlist.Items.Add(playItem);

ctrlExpressionMedia1.Play();

}

catch {

} 

Error:

Could not open media file "http://localhost:2673/SuperSpeedway.wmv AG_E_NETWORK_ERROR

 

The WMV file is a High-def video that plays just fine in my local instance of Windows Media Player (v11) on Win XP SP3

The video is located in the ClientBin folder of the Visual Studio 2008 Web Project

Anyone have any ideas?

Anyone have a working code sample that uses this control succesfully?

Thanks!

mpalmer.sps
mpalmer.sps

Member

Member

1 points

12 Posts

Answered Question

Re: Cannot play local WMV file with ExpressionMediaPlayer

ok - got it figured out

the path needs to be "ClientBin/yourvideonamehere.wmv"

 

 

Congero8
Congero8

Member

Member

7 points

18 Posts

Re: Cannot play local WMV file with ExpressionMediaPlayer

Thanks, I've been looking for this all day.Wink

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities