C sharp Windows media player ActiveX does not go to a specific time when the video is paused

382 Views Asked by At

I have added a button to allow the user to jump one second forward everytime it is clicked.

 private void button2_Click(object sender, EventArgs e)
    {
        axWindowsMediaPlayer1.Ctlcontrols.currentPosition += 1;
    }

so this is working when the video is playing, if I pause the video and click the button i can see that the timer is going one second forward but the video stay in the same frame.

Can you please advice how to do that ?

I have been looking for some solution to move one frame forward using this code:

((IWMPControls2)axWindowsMediaPlayer1.Ctlcontrols).step(1);

but I got an error message when I using IWMPControls2, I understand it's an interface but does it need a reference ?

Thanks for your help.

1

There are 1 best solutions below

2
On

You should add a using WMPLib; statement