Skip to content

Conversation

@scottrules44
Copy link
Contributor

event.completed always returns false on html5

local sound = audio.loadSound("soundfile.mp3")  -- Use your actual file name

-- Define the onComplete listener
local function onAudioComplete(event)
   if event.completed then
       print("This never runs on html")
   end
end

-- Play the audio with an onComplete listener
audio.play(sound, { onComplete = onAudioComplete })

@scottrules44 scottrules44 requested a review from Shchvova as a code owner May 27, 2025 03:21
@scottrules44 scottrules44 merged commit a0680ff into coronalabs:master May 27, 2025
1 check passed
@scottrules44 scottrules44 deleted the html-onCompleteFixes branch November 23, 2025 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants