开发者

Silverlight MediaElement video issue

Cant display the video in Silverlight.Which i saved in sql server and retrieve it from database as byte[] and subsequently convert it as Stream and put as SetSource of Media element.But cant display anything. Plz help me. Like this:

        MediaElement SoundClip = new MediaElement();
        Sound开发者_Go百科Clip.SetSource(stream);
        SoundClip.AutoPlay = false;
        SoundClip.Width = 500;
        SoundClip.Height = 500;
        SoundClip.Stretch = Stretch.Fill;
        this.LayoutRoot.Children.Add(SoundClip);
        SoundClip.Play();

But does not work.

EDIT:

It is in wmv format.

I could not even play a wmv/wma file from local drive.Is there any issue with the PC i m using.It just runs the code but does play it.does not show any error.

Any suggestion?


What format is the media?

Can it be played directly as a WMV, WMA, MP3, or H.264 file?

Is the media file completely downloaded?

  1. Monitor the HTTP traffic using Fiddler to see what's happening
  2. Attach a MediaElement.MediaFailed event to the SoundClip to see the error (if any)
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜