Skip to main content

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​

InputTypeRequiredDefaultWhat it is
PathFileYesAudio or video file, e.g. C:\alerts\done.mp3.
Show videoBooleanNofalseShow the picture in a window (for video files); audio files then show an empty window. Esc closes it.
WaitBooleanNotrueWait until playing has finished; false continues while it plays (Stop media ends it).
Volume percentNumberNo100Playback volume from 0 to 100 percent.
RepeatNumberNo1How many times to play the file.
Maximum (seconds)NumberNo0Stop after this many seconds; 0 plays to the end.
Full screenBooleanNofalseShow the video full screen.
Window widthNumberNo800Width of the video window in pixels.
Window heightNumberNo480Height of the video window in pixels.

Outputs​

OutputTypeWhat it is
duration_secondsNumberLength of the media in seconds (0 when not known, e.g. when not waiting).