« Back to Product

Documentation

MediaPlayer

Require: Symcon >= 4.0

Warning

The MediaPlayer is currently only available on the Windows installation.

With the media player module, various sound files as Wave, Midi or MP3 can be played. The module allows the use of several sound cards. This allows speech outputs (Information, Warnings) or your favorite music to be played.

Warning

When the MediaPlayer instance is created for the first time, the service must be restarted so that the sound output works correctly!

Installation

The module is part of Symcon and does not need to be installed.

Setting up the instances in Symcon

The "Media Player" module can be found under "Add instance" using the quick filter. Further information in the documentation of the instances.

Configuration page

Name Description
Device Sound card used for the output
Interval How often the variable Track Position is updated, in seconds. Lower values increase CPU usage and logfile size

Status variables

The status variables are created automatically. Deleting individual ones can lead to malfunctions.

Name Type Description
Track Position String Current position in the track
Track Length String Length of the track
Track Filename String File name of the track
Track Title String Title
Volume Integer Volume
Shuffle Boolean Shuffle the playlist
Repeat Boolean Repeat the playlist
Status Integer Status of the player

Tips & Tricks

  • You can create as many Media Player instances, and even configure them on the same sound card. This allows to continue to running the music in the background (quiet), while a second instance makes an announcement.

Functions

Function Description
WAC_AddFile Adds a music file to the playlist
WAC_ClearPlaylist Clears the playlist
WAC_GetPlaylistLength Returns the length of the playlist
WAC_GetPlaylistPosition Returns the current position in the playlist
WAC_Next Plays the next title of the playlist
WAC_Pause Pauses the playback
WAC_Play Plays the playlist
WAC_PlayFile Plays a music file directly
WAC_Prev Plays the previous title of the playlist
WAC_SetPlaylistPosition Sets the position in the playlist
WAC_SetPosition Sets the position marker in the media player with the ID InstanceID to the specified Seconds
WAC_SetRepeat Switches the repetition of the playlist on/off
WAC_SetShuffle Switches the shuffle playback on/off
WAC_SetVolume Sets the volume
WAC_Stop Stops the playback
Any questions?