views:

148

answers:

2

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();
        SoundClip.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.

A: 

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)
Michael S. Scherotter
A: 

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??????????

hasan