I have the Window Media Player control (axWindowsMediaPlayer) embedded in a forms application to play mp3 files.

When I try to unload the media, hoping it will disable the play button and not allow further playing of the music it refuses to do so. The last played track remains loaded and can be played.

The code I've tried so far to no effect is:

mediaPlayerObj.newMedia("");
mediaPlayerObj.currentMedia = null;
mediaPlayerObj.URL = "";
mediaPlayerObj.URL = null;
mediaPlayerObj.close();

Surely I'm missing something here? Any help would be gratefully received!

有帮助吗?

解决方案

I've managed to resolve this now and the resolution was this:

mediaPlayerObj.currentPlaylist.clear();
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top