I need help Playing Videos 1 after another in order.

Waslikethem

New member
Joined
Dec 22, 2018
Messages
3
Programming Experience
Beginner
Hello Guys! I need help Playing Videos one after another in order, in a way the first video will be played once, while the other after him will run in loops.
Example:

private void button1_Click(object sender, EventArgs e)
{
videoPlayer.URL = "D:/NP/Videos/First.wmv"; // I want that, this Video will play untill it ends (1 time)
videoPlayer.URL = "D:/NP/Videos/Second.wmv"; // Then, I want this Video will playing in a Loop

}

I've tried using: delay func / thread.sleep func / timer func
NON OF THEM HELPED ME REACH MY GOAL.


It must be simple...but i don't have any idea to how implement it.
I have a direction of maybe i need to create a video player with other functions that can help me reaching my goal...i don't know any..tired using google search without help.


thanks in advance
 
Please provide a FULL and CLEAR explanation of the problem. If we don't know what 'videoPlayer' is then we can't tell you how to use it. I'm guessing that it's a Windows Media Player ActiveX control but we shouldn't have to guess. That said, the general principle would hold for any control that would play video. It will hopefully have an event that is raised when it finishes playing a video. You would need top only play the first video in your Click event handler and then handle that event. In the handler for that event, you would then play second video from there. Hopefully the control has a property you can set to specify whether the video should play once or be looped.
 
Please provide a FULL and CLEAR explanation of the problem. If we don't know what 'videoPlayer' is then we can't tell you how to use it. I'm guessing that it's a Windows Media Player ActiveX control but we shouldn't have to guess. That said, the general principle would hold for any control that would play video. It will hopefully have an event that is raised when it finishes playing a video. You would need top only play the first video in your Click event handler and then handle that event. In the handler for that event, you would then play second video from there. Hopefully the control has a property you can set to specify whether the video should play once or be looped.

you guessed right, Windows Media Player ActiveX
Well, I solved the problem.
I used 'PlayStateChange' and 'IF' statements for each specific videos, thanks anyways.
 

Latest posts

Back
Top Bottom