fix(station): allow music to restart after stop
Keep the active music stream attached until Audio.stop runs so stop requests finish the stream reader cleanly and the next music playback can start again without getting stuck behind the previous stream.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
-- ============================================================================
|
||||
-- 1. Configuration & Constants
|
||||
-- ============================================================================
|
||||
local APP_VERSION_TEXT = "v1.0.9"
|
||||
local APP_VERSION_TEXT = "v1.0.10"
|
||||
|
||||
local CONFIG = {
|
||||
CLOUD_URL = "ws://stabadmin.fse-media.group",
|
||||
@@ -1628,11 +1628,9 @@ function Network.messageLoop()
|
||||
end
|
||||
State.audioQueue = kept
|
||||
|
||||
if State.audioRx and tostring(State.audioRx.source or "") == "music" then
|
||||
State.audioRx = nil
|
||||
end
|
||||
|
||||
if State.currentPlaying and tostring(State.currentPlaying.source or "") == "music" then
|
||||
local hasMusicRx = State.audioRx and tostring(State.audioRx.source or "") == "music"
|
||||
local hasMusicCurrent = State.currentPlaying and tostring(State.currentPlaying.source or "") == "music"
|
||||
if hasMusicRx or hasMusicCurrent then
|
||||
Audio.stop("current")
|
||||
end
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user