Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

audio.play onComplete bug?
Started by kbradford Dec 30 2019 12:23 PM

- - - - -
2 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

kbradford

[GLOBAL: userInfoPane.html]
kbradford
  • Contributor

  • 279 posts
  • Corona SDK

I'm playing an audio file and have an onComplete function, and within that function I check event.completed to make sure the audio finished playing.  However in HTML5 builds the event.completed is always false, it never returns true even on a successfull audio file play.

 

The code works just fine in simulator, iOs, Android, etc.  Only have this problem on HTML5 builds.

 

Here's an example:

local playNext = function(event)	
  if event.completed == true then
    print("DO STUFF")
  end
end

local handle = audio.loadSound("voices/test.mp3")				
audio.play( handle, {onComplete = playNext} )


[TOPIC: post.html]
#2

fazeclanup065

[GLOBAL: userInfoPane.html]
fazeclanup065
  • Observer

  • 1 posts
  • Corona SDK

 

I'm playing an audio file and have an onComplete function, and within that function I check event.completed to make sure the audio finished playing.  However in HTML5 builds the event.completed is always false, it never returns true even on a successfull audio file play.

 

The code works just fine in simulator, iOs, Androidcmy coles.etc.  Only have this problem on HTML5 builds. 

 

Here's an example:

local playNext = function(event)	
  if event.completed == true then
    print("DO STUFF")
  end
end

local handle = audio.loadSound("voices/test.mp3")				
audio.play( handle, {onComplete = playNext} )

Did you found solution for this? if yes then do let me know i am facing same kind of problem thanks :)

 



[TOPIC: post.html]
#3

kbradford

[GLOBAL: userInfoPane.html]
kbradford
  • Contributor

  • 279 posts
  • Corona SDK

Nope, still a bug.  I worked around it by ignoring event.completed when I am doing html5 builds.  It's not an ideal solution because some of my sounds overlap now, but it's not game breaking.  Is there a place to report actual bugs other than here?




[topic_controls]
[/topic_controls]