Reputation: 33
I want to have a video play within my program, however i dont want to refer to a video that is outside of my program, is there a way to have the video embedded into the program.
I have tried refering to resources of the application and adding video there however this doesn't seem to be possible.
axWindowsMediaPlayer1.URL = Properties.Resources.INTRO
I would like to have the video play from the application and not have to know where the video is on the computer as this is something that will change from computer to computer.
Upvotes: 3
Views: 153
Reputation: 1099
Looks like axWindowsMediaPlayer can't play video out of stream. Is is appropriate to you to save resource video to temporary file and then play it?
var fileName = System.IO.Path.GetTempFileName();
File.WriteAllBytes(fileName, Properties.Resources.INTRO);
axWindowsMediaPlayer1.URL = fileName;
Upvotes: 1