LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows Media Player

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.

 

 

0 Kudos
Message 1 of 7
(4,307 Views)

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. 

 

 

http://www.ni.com/example/29540/en/

0 Kudos
Message 2 of 7
(4,255 Views)

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.

0 Kudos
Message 3 of 7
(4,236 Views)

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..

0 Kudos
Message 4 of 7
(4,206 Views)

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

 

 

0 Kudos
Message 5 of 7
(4,190 Views)

OK thanks Haley.  I'm glad you were able to recreate the same issue I was.  I'll keep looking too.

 

 

0 Kudos
Message 6 of 7
(4,127 Views)

Is there a way to check compatability between Active X and Labview??  I'm refering to versions??

0 Kudos
Message 7 of 7
(4,124 Views)