I am developing an app. in windows form application in C# , which user can upload two video in two separate player and there are Play, Pause, and Stop button which enables the user to play,pause and stop two video synchronously.
For the Pause function, when the user presses the button it stops at that time spot but when the play button is pressed it starts from the begining of the stream.
For that, I want to save the time of the first and second videos in which the pause button was chosen and save them to a text-file for example: first line- first player: 01:02:03 , and second line-second player: 04:05:03 and then when the play button is set it reads from the text file and start from those given times of each player.
I have clearly in my mind what to do, but need some help for writing the code.
Thank you
private void Play_button2_Click(object sender, EventArgs e)
{
axWindowsMediaPlayer1.URL = Path_textBox1.Text;
axWindowsMediaPlayer1.Ctlcontrols.play();
axWindowsMediaPlayer2.URL = Path_textBox2.Text;
axWindowsMediaPlayer2.Ctlcontrols.play();
}
private void Stop_button3_Click(object sender, EventArgs e)
{
axWindowsMediaPlayer1.Ctlcontrols.stop();
axWindowsMediaPlayer2.Ctlcontrols.stop();
}
private void Pause_button1_Click_1(object sender, EventArgs e)
{
axWindowsMediaPlayer1.Ctlcontrols.pause();
axWindowsMediaPlayer2.Ctlcontrols.pause();
}