Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API PlayMusic

Last wiki revision 2022-08-01

Plays the specified sound file on loop to the "Music" sound channel. willPlay = PlayMusic(musicfile or fileDataID)

  • musicfile: - Path to a custom .ogg or .mp3 file from an addon. The file must exist prior to logging in to WoW.
  • or fileDataID: - FileDataID of the sound file.
  • willPlay: - Seems to always return true even for invalid file paths or FileDataIDs.

Plays Stormstout Brew from the Mists of Pandaria Soundtrack -- by file path (dropped in 8.2.0) PlayMusic("sound/music/pandaria/mus_50_toast_b_03.mp3")

-- by FileDataID 642878 (added support in 8.2.0) PlayMusic(642878)

  • If any of the built-in music is playing when you call this function (e.g. Stormwind background music), it will fade out.
  • The playback loops until it is stopped with, when the user interface is reloaded, or upon logout. Playing a different sound file will also cause the current song to stop playing. It cannot be paused.
  • OggVorbis (.ogg) files are supported since World of Warcraft uses the FMOD sound engine.
  • You can find a full list here: https://wow.tools/files/#search=sound/music

Source

https://warcraft.wiki.gg/wiki/API_PlayMusic · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.