locked
Bug in WMPLib Playlist repeat? RRS feed

  • Question

  • I have  method that sets up a playlist (PlayListInLoop).  I set the loop to true and call play.  The list plays fine once and then it plays the first track a second time and stops.  If I call play again it will start the loop as expected and repeat it.  I am wondering why I have to call play a second time.  If I just set the URL property to a single file, set loop and then call play it works fine.

    Here is my code below.

            public void PlayListInLoop(List<string> paths)
            {
                _playlist = _player.playlistCollection.newPlaylist("MyList");
                foreach (string path in paths)
                {
                    if (System.IO.File.Exists(path))
                    {
                        WMPLib.IWMPMedia media = _player.newMedia(path);
                        _playlist.appendItem(media);
                    }
                }
                _player.currentPlaylist = _playlist;
    
                _player.settings.setMode("loop", true);
                _player.controls.play();
                                        
            }
    
            public void PlayRepeat()
            {            
                _player.controls.play();
            }



    • Edited by Voast Dev Wednesday, August 15, 2012 3:51 PM give a name that gains more interest.
    Tuesday, August 14, 2012 4:39 AM

All replies

  • Maybe you should also set the “autoRewind” mode as well?

    Tuesday, August 14, 2012 6:31 AM
  • That didn't change anything.
    Wednesday, August 15, 2012 3:51 PM