开发者

Why i Can't play clip on MediaElement?

I using controls:ChildWindow and on this childwindow i have MediaElement. I set the MediaElement source to be some wmv file ( path of the clip is hard code ) and when the childwindow is up - i call MediaElement.Play

Code:

 mediaElement.Play();

Xaml:

<Grid>
    <MediaElement Name="mediaElement" Source="/Resource/movie.wmv" Stretch="Fill" />
</Grid>

But i don't see an开发者_C百科ything - and i don't understand why.

The on MediaElement.MediaFailed i get exception '4001 AG_E_NETWORK_ERROR' and the movie.wmv location is on my local machine hardisk

Someone can help here ?

Thanks.


The Source path is relative to the XAP file's directory (ClientBin). Are you sure the path is correct?

If that seems fine... the MediaElement errors are not always very informative, so maybe it is loading it but there is some problem with codecs (Silverlight only supports a partial set of the codecs Windows Media Player supports).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜