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.}..."
 
No edit summary
 
(One intermediate revision by one other user not shown)
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 when new metadata was received 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}}

Latest revision as of 10:45, 7 July 2020

OnSoundUpdateMeta

Type: Event
Context: Client
Introduced: v1.0

Description

Called when new metadata was received 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