I'm having a weird problem with RadMediaPlayer.
My code is written so that a user can select a video file from the local file system. Then it attempts to play the video thus:
My code is written so that a user can select a video file from the local file system. Then it attempts to play the video thus:
private
FileInfo m_fi;
private string m_fileName;
...
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter =
"Media WMV|*.wmv";
if (dlg.ShowDialog() == true)
{
m_fi = dlg.File;
m_fileName = m_fi.Name;
try
{
MyPlayer.MediaElement.SetSource(m_fi.OpenRead());
MyPlayer.MediaElement.Play();
}
catch (Exception ex)
{
MessageBox.Show("Error playing video: " + ex.Message);
}
}
The video plays, but I only receive the audio. I know that there is a real video there, because I have played it using other code (a video player project from codeplex).
Any suggestions?
BTW, is there some trick to avoid a bunch of extra lines when posting code snippets?
thx
Helen