Controlling media playback using windows media sdk
-
I wish to control media playback in windows media player by changing songs according to certain conditions generated by my plugin. To change songs, i use the IWMPControls interface and call the function put_currentItem() under the wmppsTransitioning media event. But the problem i face when using this function is that the wmppsTransitioning event is recalled by media player in this process & the currently selected song in the playlist is the one that media player was supposed to play had i not called the put_currentItem() function (even though the song played is the one passed to the put_currentItem() function!!). As a result of this, the play count and other metadata tags are incremented at the end of the media not for the song being played but for the song that is selected by media player. This leads to a conflict in my plugin. Can any one pls help me with a workaround to override windows media events and completely govern the next media to be played without windows media player interfering in-between ?? Also it will be appreciated if anyone can help me out with changing media in a playlist without any interference from windows media Player. Nikhil