C# Windows Media Player - Repeat single song in a playlist
        Posted  
        
            by Professor Mustard
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Professor Mustard
        
        
        
        Published on 2010-04-07T12:14:13Z
        Indexed on 
            2010/04/07
            12:33 UTC
        
        
        Read the original article
        Hit count: 1119
        
I have a PlayList loaded into my WMP instance, and I want it to loop just one song. Everything I've Googled up so far tells me to do this:
private AxWindowsMediaPlayer wmp;
wmp.settings.setMode("loop", true);
However, this only seems to make the entire PlayList repeat. The behavior I want is that, if I enable "repeat" when song 5 in the PlayList is playing, then song 5 will keep automatically repeat when it finishes (instead of proceeding to song 6). Most car MP3 players already work this way; is there a nice native way to do this in my C# program, or will I have to devise a "hack" solution, like intercepting the event that fires when the next song is loaded?
© Stack Overflow or respective owner