# MediaPlayer > Symcon documentation · English · generated on 2026-09-26 > Index: https://www.symcon.de/en/llms.txt Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/ 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. ### 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. ## WAC_AddFile Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-addfile/ `bool WAC_AddFile(int $InstanceID, string $Filename)` adds a music file to the playlist **Parameters** - `$InstanceID` (int): ID of the controlled media player - `$Filename` (string): Path to the file to be played **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Path to the file to be played **Example** ```php //Please note the slashes in the path. //The exact meaning you can read in the PHP manual: //http://de.php.net/manual/de/language.types.string.php WAC_AddFile(12345, "D:/MP3s/favoritesong.mp3"); ``` ## WAC_ClearPlaylist Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-clearplaylist/ `bool WAC_ClearPlaylist(int $InstanceID)` clears the playlist **Parameters** - `$InstanceID` (int): ID of the controlled media player **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. ID of the controlled media player **Example** ```php WAC_ClearPlaylist(12345); ``` ## WAC_GetPlaylistLength Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-getplaylistlength/ `int WAC_GetPlaylistLength(int $InstanceID)` returns the length of the playlist **Parameters** - `$InstanceID` (int): ID of the controlled media player **Returns** (int): Number of tracks, which are registered in the playlist. ID of the controlled media player **Example** ```php $len = WAC_GetPlaylistLength(12345); if($len > 0) WAC_Play(12345); ``` ## WAC_GetPlaylistPosition Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-getplaylistposition/ `int WAC_GetPlaylistPosition(int $InstanceID)` returns the current position in the playlist **Parameters** - `$InstanceID` (int): ID of the device to be switched **Returns** (int): Value between 1 and [WAC_GetPlayListLength](mediaplayer.md), if the playlist should be empty, it returns -1. ID of the device to be switched **Example** ```php $pos = WAC_GetPlaylistPosition(12345); ``` ## WAC_Next Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-next/ `bool WAC_Next(int $InstanceID)` plays the next title of the playlist **Parameters** - `$InstanceID` (int): ID of the controlled media player **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. ID of the controlled media player **Example** ```php WAC_Next(12345); ``` ## WAC_Pause Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-pause/ `bool WAC_Pause(int $InstanceID)` pauses the playback **Parameters** - `$InstanceID` (int): ID of the controlled media player **Returns** (bool): If the command was executed successfully, it returns the result __TRUE__, otherwise __FALSE__. It is also returned __TRUE__ if no active playback is available. ID of the controlled media player **Example** ```php WAC_Pause(12345); ``` ## WAC_Play Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-play/ `bool WAC_Play(int $InstanceID)` plays the playlist **Parameters** - `$InstanceID` (int): ID of the controlled media player **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. ID of the controlled media player **Example** ```php WAC_Play(12345); //Play ``` ## WAC_PlayFile Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-playfile/ `bool WAC_PlayFile(int $InstanceID, string $Filename)` plays a music file directly **Parameters** - `$InstanceID` (int): ID of the controlled media player - `$Filename` (string): Path to the file to play **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Path to the file to play **Example** ```php //Please note the slashes in the path. //The exact meaning, read the PHP manual: http://de.php.net/manual/de/language.types.string.php WAC_PlayFile(12345, "D:/MP3s/Favorite song.mp3"); ``` ## WAC_Prev Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-prev/ `bool WAC_Prev(int $InstanceID)` plays the previous title of the playlist **Parameters** - `$InstanceID` (int): ID of the controlled media player **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. ID of the controlled media player **Example** ```php WAC_Prev(12345); ``` ## WAC_SetPlaylistPosition Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-setplaylistposition/ `bool WAC_SetPlaylistPosition(int $InstanceID)` sets the position in the playlist **Parameters** - `$InstanceID` (int): ID of the device to be switched **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. ID of the device to be switched **Example** ```php WAC_SetPlaylistPosition(12345, 0); //An Anfang setzen ``` ## WAC_SetPosition Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-setposition/ `bool WAC_SetPosition(int $InstanceID, int $Seconds)` **Parameters** - `$InstanceID` (int): ID of the controlled media player - `$Seconds` (int): Label in seconds **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Label in seconds **Example** ```php WAC_PlayFile(12345, "my.mp3"); //Play title WAC_SetPosition(12345, 60); //jump on the 1 minute mark in the song ``` ## WAC_SetRepeat Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-setrepeat/ `bool WAC_SetRepeat(int $InstanceID, bool $Repeat)` switches the repetition of the playlist on/off **Parameters** - `$InstanceID` (int): ID of the controlled media player - `$Repeat` (bool): __TRUE__ for On, __FALSE__ for Off **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. __TRUE__ for On, __FALSE__ for Off **Example** ```php WAC_SetRepeat(12345, true); //Activate playlist repeat ``` ## WAC_SetShuffle Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-setshuffle/ `bool WAC_SetShuffle(int $InstanceID, bool $Shuffle)` switches the shuffle playback on/off **Parameters** - `$InstanceID` (int): ID of the controlled media player - `$Shuffle` (bool): __TRUE__ for On, __FALSE__ for Off **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. __TRUE__ for On, __FALSE__ for Off **Example** ```php WAC_SetShuffle(12345, true); //Zufallswiedergabe einschalten ``` ## WAC_SetVolume Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-setvolume/ `bool WAC_SetVolume(int $InstanceID, int $Volume)` sets the volume **Parameters** - `$InstanceID` (int): ID of the controlled media player - `$Volume` (int): 0-100 (%) **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. 0-100 (%) **Example** ```php WAC_SetVolume(12345, 85); ``` ## WAC_Stop Source: https://www.symcon.de/en/service/documentation/module-reference/notifications/mediaplayer/wac-stop/ `bool WAC_Stop(int $InstanceID)` **Parameters** - `$InstanceID` (int): ID of the controlled media player **Returns** (bool): If the command was executed successfully, it returns the result __TRUE__, otherwise __FALSE__. It is also returned __TRUE__ if no active playback is available. ID of the controlled media player **Example** ```php WAC_Stop(12345); ```