Would go up top some where. Need using System.Runtime.InteropServices;PHP Code:
[DllImport("winmm.dll")]
private static extern long mciSendString(string strCommand, StringBuilder strReturn, int iReturnLength,
IntPtr hwndCallback);
Goes in the play button and what not.PHP Code:
mciSendString("open \"" + File_To_Play + "\" type mpegvideo alias MediaFile", null, 0, IntPtr.Zero);
mciSendString("play MediaFile", null, 0, IntPtr.Zero);
Stop playing.PHP Code:
mciSendString("close MediaFile", null, 0, IntPtr.Zero);
Results 1 to 4 of 4
- 26 Feb. 2011 06:59pm #1
[C#] Play Song or Movie without Media Player
- 26 Feb. 2011 09:34pm #2
- 26 Feb. 2011 09:35pm #3
- 28 Feb. 2011 03:41pm #4
That's cool.
Watching the videuld be even awesome-er. Might want to do some research on how media players work before going into that, though.