Media - ugly fix
- Fix stop button not working - Fix previous track not stopping when new one played. - Note: I had to use Sound_GameSystem_RestartSoundSystem(), which triggers a client freeze, but it's the only way i could find, since there is no StopSound() api. I also do not undertsand what is a musicHandle local, and why it's always false?
This commit is contained in:
parent
7642165563
commit
b0e4e8786b
1 changed files with 4 additions and 1 deletions
|
|
@ -12388,6 +12388,7 @@ function LeaPlusLC:FriendCheck(name)
|
|||
stopBtn:Hide(); stopBtn:Show()
|
||||
LeaPlusLC:LockItem(stopBtn, true)
|
||||
stopBtn:SetScript("OnClick", function()
|
||||
Sound_GameSystem_RestartSoundSystem()
|
||||
if musicHandle then
|
||||
StopSound(musicHandle)
|
||||
musicHandle = nil
|
||||
|
|
@ -12410,7 +12411,9 @@ function LeaPlusLC:FriendCheck(name)
|
|||
-- Function to play a track and show the static highlight bar
|
||||
local function PlayTrack()
|
||||
-- Play tracks
|
||||
if musicHandle then StopSound(musicHandle) end
|
||||
-- if musicHandle then StopSound(musicHandle) end
|
||||
Sound_GameSystem_RestartSoundSystem()
|
||||
-- Sound_GameSystem_RestartSoundSystem()
|
||||
local file, soundID, trackTime
|
||||
if strfind(playlist[tracknumber], "#") then
|
||||
if strfind(playlist[tracknumber], ".mp3") then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue