To download NI software, including the products shown below, visit ni.com/downloads.
This example VI opens Windows Media Player on your computer and plays a selected file.
You can use any video file that is supported by Windows Media Player (.mpa, .mp2, .mp3, .avi, .wma, etc..). The Strip Path VI finds the location of the current VI. This is particularly useful if the example file is saved to this folder as well. If not, then the video file path can be referenced directly into the constant. The Build Path VI adds the current folder filepath to the video name so that the full filepath can be used to play the video. There are many Windows Media Player (WMP) ActiveX classes that can manipulate it in a number of ways.
Steps to Implement or Execute Code
Additional Information or References
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Not all of us have moved on to 8.6
Good example! I tried it on LV2009 and it works, however the stretchToFit method does not work so it does not resize the player when the main window is resized.
- WinXP, WMP 10.0
It can meet basic needs,so good.
How can you build this from scratch? I placed "Automation Open" and "property node", but I was not able to place the reference to "WindowsMediaPlayer". I tried using "create control", but I was not able to generate similar controls. Downloading it from your site, I was able to run it very well, I'm working with LabVIEW13.
Thank you very mutch. I think it's very hard to find the ActiveX reference in that long list whithout search button.
Thank you so much!