Notifications
Clear all

[Closed] Windows Media Player

Hi guys

I am trying to play a video with the windows media player from a maxscript. This is what I got so far:

player = CreateOLEObject "WMPlayer.OCX"
 videofile = getopenfilename caption:"Choose a video" types:"Video file(*.wmv, *.mp4, *.avi, *.mpg, *.mp2, ...)|*.*" historyCategory:"elmarko"
 if videofile != undefined then player.url = videofile
 player.controls.play()

But for some reason the player doesn’t show up. I can hear the audio, but there’s no player. I can also use commands like “player.controls.pause()” to control the player, but the player itself is not to be seen.

Can you confirm the problem. Do you know any solution? Maybe a different player that works better?

If you want to stop the player use player.controls.stop(). And if you want to close the player entirely use releaseAllOleObjects().

thanks, David