Play media file
Play an MP3, WMA, M4A, WAV or other audio file, or a video (MP4, WMV, AVI...) in a window, with the media support of Windows; wait until it ends or continue while it plays.
Command in the Play sound toolkit · id ooa.sound/play_media · 9 inputs (1 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Path | File | Yes | Audio or video file, e.g. C:\alerts\done.mp3. | |
| Show video | Boolean | No | false | Show the picture in a window (for video files); audio files then show an empty window. Esc closes it. |
| Wait | Boolean | No | true | Wait until playing has finished; false continues while it plays (Stop media ends it). |
| Volume percent | Number | No | 100 | Playback volume from 0 to 100 percent. |
| Repeat | Number | No | 1 | How many times to play the file. |
| Maximum (seconds) | Number | No | 0 | Stop after this many seconds; 0 plays to the end. |
| Full screen | Boolean | No | false | Show the video full screen. |
| Window width | Number | No | 800 | Width of the video window in pixels. |
| Window height | Number | No | 480 | Height of the video window in pixels. |
Outputs
| Output | Type | What it is |
|---|---|---|
| duration_seconds | Number | Length of the media in seconds (0 when not known, e.g. when not waiting). |