Closed AdlanDzulkfali closed 1 year ago
When I try to get the sound info. maxduration and timestamp always return 0 for youtube song. Is this expected or is it a bug? below is the data that I've captured
{"maxDuration":0,"volume":0.55,"timeStamp":0,"paused":false,"isDynamic":true,"loop":false,"distance":10,"url":"https://www.youtube.com/watch?v=nKgN0ZzJP4c","playing":true,"position":{"x":82.59248352050781,"y":-865.4900512695313,"z":134.7701416015625},"id":"test","destroyOnFinish":true}
The onPlay event has priority over timestamp you have to just wait 1ms to get the timestamp aswell. I will switch the priority event so it can be done without waiting.
CreateThread(function()
Wait(2000)
PlayUrlPos("test", "https://www.youtube.com/watch?v=nKgN0ZzJP4c", 0.55, GetEntityCoords(PlayerPedId()), false)
onPlayStart("test", function()
Wait(1)
dump(getInfo("test"))
end)
end)
When I try to get the sound info. maxduration and timestamp always return 0 for youtube song. Is this expected or is it a bug? below is the data that I've captured
{"maxDuration":0,"volume":0.55,"timeStamp":0,"paused":false,"isDynamic":true,"loop":false,"distance":10,"url":"https://www.youtube.com/watch?v=nKgN0ZzJP4c","playing":true,"position":{"x":82.59248352050781,"y":-865.4900512695313,"z":134.7701416015625},"id":"test","destroyOnFinish":true}