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 | {{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 == | ||
<syntaxhighlight lang="Lua> | |||
AddEvent("OnSoundUpdateMeta", function(sound, meta) | |||
AddPlayerChat("Sound ID " .. sound .. " is now playing: " .. meta .. "!") | |||
end) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{ | {{SoundEvents}} |
Latest revision as of 10:45, 7 July 2020
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)