LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Media Player in Tab Control

I've developed code to embed Media Player as in ActiveX container for display on the front panel of a VI.  Everything works well, except when I embed this Media Player control in a tab control.  Whenever I load\play a movie, the Media Player control seems to "float" on the tab.  In other words, do matter what tab I'm on, the Media Player control stays on top.  This behavior only exists when a movie is actually loaded\playing.  If no movie is loaded, then the appropriate behavior is observed.

I've attached an example program, "MediaPlayer Test.vi" (which contains the subVI "MediaPlayer Controller") to illustrate this problem.  So long as no movie is loaded, clicking on page 2 of the tab control hides the Media Player control.  If a movie is loaded (hit "Load" while a valid path to an .avi file is selected), then this movie stays on the front of the tab control, no matter which page is selected.  Unloading the movie (hit "close") returns the Media Player control back to the original, desired behavior.  Hitting "Stop" at the bottom stops the entire program.  All other buttons are self explanitory.

The attached .llb is LV 8.2.  Let me know if a previous version is required.
0 Kudos
Message 1 of 13
(4,975 Views)
Does the media player have an option for staying on top during playback?

> So long as no movie is loaded, clicking on page 2 of the tab control hides
> the Media Player >control.  If a movie is loaded (hit "Load" while a
> valid path to an .avi file is selected), then >this movie stays on the
> front of the tab control, no matter which page is selected. 
> Unloading >the movie (hit "close") returns the Media Player control back
> to the original, desired >behavior. 


0 Kudos
Message 2 of 13
(4,964 Views)
Media Player (the actual standalone player) has an always on top mode, but changing that does nothing--it only affects the standalone player.  I've fooled around with all manner of video settings, and video rendering settings (hardware overlay, DirectX acceleration, etc.) and the problem persists.  I've run the program on multiple computers with different video cards and the problem persists.
0 Kudos
Message 3 of 13
(4,962 Views)
Interesting little behavior. I also noticed that trying to hide the control doesn't do anything. But then, it's a Microsoft control, so there you go. Does this MS KB article help?

Message Edited by smercurio_fc on 05-29-2007 12:52 PM

0 Kudos
Message 4 of 13
(4,962 Views)
That is an interesting KB article.  The video renderer is on by default, and I have no idea how to access z index settings (although I did play around with the front panel object order--the z index attribute seems to be associated specifically with html pages).  The strange thing is that I can't get the embedded Media Player object to go into windowless video mode.  Every time I set it to true, it stays false, whether I do it manually (via property browser) or programmatically. 
0 Kudos
Message 5 of 13
(4,949 Views)
This is strange behavior! I will report this issue to our R&D team right away, and hopefully we can determine if the problem is a limitation of the Windows Media Player ActiveX object itself, or the way that LabVIEW deals with the object in the ActiveX container. Thank you for posting your very helpful example code!
 
Regards,
 
Casey Weltzin
Applications Engineer
National Instruments
0 Kudos
Message 6 of 13
(4,923 Views)
I'm sorry to revive this thread, but I was told by some regulars on the LAVAG forum to request a CAR number to ensure that this bug is addressed.  In the mean time, I've instituted a hack that involves responding to tab control value changes by setting the MediaPlayer "uiMode" property to "none" or "invisible" depending on if the MediaPlayer tab is selected or not.  I would appreciate an update if any other direct fix has been found.
0 Kudos
Message 7 of 13
(4,844 Views)

The Corrective Action Request (CAR) ID for this issue is 4B1AH2X6.

Please note that right clicking on an ActiveX container inside a tab control and selecting Property Browser, then changing the WindowlessVideo property to true appears to resolve the issue. I am checking with our R&D team to determine why this behavior is occurring.

Regards,

Casey Weltzin
Applications Engineer
National Instruments

0 Kudos
Message 8 of 13
(4,808 Views)
I have tried to change Windowless Video to True in the property browser--it refuses to accept that change, and stays False.
0 Kudos
Message 9 of 13
(4,799 Views)
Hi Yuri,
 
What version of LabVIEW are you using? On my end, I am able to change the WindowlessVideo property without problems.
 
Regards,
 
Casey Weltzin
Applications Engineer
National Instruments
0 Kudos
Message 10 of 13
(4,795 Views)