OnSoundUpdateMeta: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Event|Client|1.0}} {{FuncDescription|Called received new metadata from a network stream. (.pls playlist streams) This can be the name of the station, song and artist.}..."
 
Chloe (talk | contribs)
Added an example, sound events tag and fixed a very minor grammar error.
Line 1: Line 1:
{{Info|Event|Client|1.0}}
{{Info|Event|Client|1.0}}


{{FuncDescription|Called received new metadata from a network stream. (.pls playlist streams) This can be the name of the station, song and artist.}}
{{FuncDescription|Called received new metadata from a network stream. (.pls playlist streams) This can be the name of the station, song, and artist.}}


{{FuncSyntax|OnSoundUpdateMeta(sound, meta)}}
{{FuncSyntax|OnSoundUpdateMeta(sound, meta)}}
Line 10: Line 10:


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua>
AddEvent("OnSoundUpdateMeta", function(sound, meta)
AddPlayerChat("Sound ID " .. sound .. " is now playing: " .. meta .. "!")
end)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
{{ClientEvents}}
{{SoundEvents}}

Revision as of 22:39, 15 January 2020

OnSoundUpdateMeta

Type: Event
Context: Client
Introduced: v1.0

Description

Called received new metadata from a network stream. (.pls playlist streams) This can be the name of the station, song, and artist.

Syntax

OnSoundUpdateMeta(sound, meta)

Parameters

  • sound
    The sound identifier.
  • meta
    The metadata received.

Example

AddEvent("OnSoundUpdateMeta", function(sound, meta)
	AddPlayerChat("Sound ID " .. sound .. " is now playing: " .. meta .. "!")
end)

See also