Search code examples
c#repeatwmpwmplib

Repeat a song with WMPlib


sorry for asking simple question right here again. Due to I still new in C#, and although I have go through some sample but I couldn't solve my problem, can someone help me on this?? The code I have right now as below:

if (NewState == (int)WMPLib.WMPPlayState.wmppsMediaEnded)

            {
                wplayer.settings.setMode("loop", true);
                wplayer.controls.play();
            }

I failed to repeat the song after the song is done played, how to make it keep on repeat playing??


Solution

  • You could put your playlist in a list of IWMPMedia, and have the player point to the current song once it's done playing.