05-19-2014 07:13 AM
Media Player 10
Windows 7
Labview 2012
What is the difference between IWMPPlayer4 and Windows Media Player??
I've read a number of posts. Has there ever been a resolution to sizing the video?? I tried the solution here:
http://forums.ni.com/t5/LabVIEW/Windows-Media-Player-size/m-p/1310251#M538314 but that doesn't work. It resizes the Media Player window to what I tell it then when the video.wmv plays, it again resizes to the video size.
is there a way ( Active X??) to hide the controls when you run Media Player in Labview?? The ones at the bottom of media player window.
Is there a way to keep the last image displayed once the media player stops playing the *.wmv file ...then reinit it for the next time the labview file is called??
I'm runing a short clip ( video.wmv) showing the user how to chg a sw from one position to the next and want the last image to stay on the screen until they hit an OK button. Then when they run the program again it starts at the begining of the clip and stops as described above.
05-20-2014 11:51 AM
Clint_Eastwood,
I just did a quick search in the NI Community for a Windows Media Player example and found an example that controls Windows Media Player by using Microsoft's Internet Explorer and Document Object Model (DOM) ActiveX interfaces. It loads the video within an ActiveX container, controls the page using an html file, and uses the DOM model to progammatically control the interface. It also gives you the option to pause the program. Seems like a good starting point for you.
05-21-2014 04:38 AM
Thanks Haley,
For what its worth I've spent the last 2 days searching and trying different solutions. I searched on Media Player. I don't know what I'm doing wrong but I can't get Media player to work w Labview 2012/windows 7/WMP12 reliably. It'll play my wmv a couple of times fine then the 4th/5th...time the player is playing but the screen is blank. I haven't chg'd a thing. I looked on the Microsoft website for a better understanding of active x and that was a nightmare. I wish either microsoft or National would define what the different..I don't even know of a good word here...nodes(?) mean. For example if I create a property node in WMP4 what does status do for me...What does "controls" do/mean?? How do I get media player NOT to play before I run the vi. Its a though media player has its properties set to play the 1st time it is called. It does, after hours I found if you right click on the WMP screen ( by chance) you get a list of properties. One is to play when called. Is this documented any where??? Or trial and error??? I looked in the LV 2012 manual..nothing . From the discussions grp it sounds like a lot of other people are have issues w WMP. If I had had the correct file type ( avi?) I would have tried Quick time...another learning curve.
05-22-2014 10:14 AM
Haley,
I tried your suggestion using IE. I can run the vi a billion times w/o problems but the minute I hit the STOP button then rerun it it won't play. I tried placing probes to see where the error occurs. Inside the event structure on the ITEM variable of IHTMLELEMENTCOLLECT I get zero when it fails to run. Do I have to "reset" active x or something once I hit the stop button?? If I close out of LABVIEW completely and recall the vi it works fine. Its only after I run it then hit stop button it doesn't play. If I can resolve this it should solve my media player problem.
Thanks..
05-22-2014 04:39 PM
Clint_Eastwood,
I'm noticing the same behavior as you and trying to workaround it. The VI is able to work more than once when highlight is turned on which leads me to believe not all of the references are closing properly.. In the meantime, I've located the page that describes the different properties of the Windows Media Player Active X control
http://msdn.microsoft.com/en-us/library/windows/desktop/dd564581(v=vs.85).aspx
05-29-2014 09:38 AM
OK thanks Haley. I'm glad you were able to recreate the same issue I was. I'll keep looking too.
05-29-2014 09:41 AM
Is there a way to check compatability between Active X and Labview?? I'm refering to versions??