Glenn
Glenn

Reputation: 499

mediaelement not playing

Im trying to play a wmv video on the home page of a Silverligh Navigation Application, but it won't start playing. I've stored the file in the clientbin folder and changed the build action to resource.

<Canvas Name="Holder" Width="350" Height="220" Background="Black">
    <MediaElement Name="Video" AutoPlay="True" Volume="100" Source="vid.wmv"/>
</Canvas>

Additionally I've tried making a button and add a Video.Play() method but still no luck... When I play the file using WMP it works perfect.

Any ideas?

Thanks

Upvotes: 1

Views: 1301

Answers (1)

Luke Woodward
Luke Woodward

Reputation: 65054

There's quite probably an exception being thrown while attempting to load the video. Add a handler to the MediaFailed event of your MediaElement and see what the exception you get from inside the ExceptionRoutedEventArgs parameter is.

Upvotes: 2

Related Questions