Closed Noshei closed 2 hours ago
Uhm which "Request" function do you mean? I don't see any in https://www.wowace.com/projects/libsharedmedia-3-0/pages/api-documentation
ah typo on my part, I meant Register. Which is documented as only being a string, but is implemented to allow for a string or a number.
as an example, this will work to register the correct sound
media:Register("sound", "Auction Window Open", 567482)
but this wont register anything:
media:Register("sound", "Auction Window Open", "567482")
as an example, this will work to register the correct sound
media:Register("sound", "Auction Window Open", 567482)
but this wont register anything:
media:Register("sound", "Auction Window Open", "567482")
Huh I'm confused, the data
argument is documented as a string type in their docs. But in your example you're saying this FileID as a number works, but does not work not as a string; and in the original issue you wanted it to be marked as a string|integer type? 😕
so the actual code for Register is a bit messy, but it accepts both string and number.
If you want to register a file from your addon you can do so with the file path as a string:
media:Register("font", "Fira Mono Medium", "Interface\\Addons\\GatheringTracker\\Media\\Fonts\\FiraMono-Medium.ttf")
This will work just fine. And some blizzard files will also work this way, but others will only work with the FileID and when you use a FileID in the Register function, it needs to be a number to register correctly.
The Request function in LibSharedMedia supports both string and integer. In the Annotation file it is set to only support string.
Can this be updated in the annotations file to support both, thanks.