[HTML5] howler bug?


#1

Hi,
I am using the latest libs (Lime 7.1.1 + Openfl 8.6.4) and sometimes, randomly I have crashes related to howler, or simple errors that don’t arrest the execution of the application (?!). The latest log I received is this one

Error: Failed to execute 'stop' on 'AudioScheduledSourceNode': cannot call stop without calling start first.
    at o.pause (howler.min.js:2)
    at e (howler.min.js:4)
    at o.Howl.pos (howler.min.js:4)
    at lime__$internal_backend_html5_HTML5AudioSource.setPosition (HTML5AudioSource.hx:307)
    at lime__$internal_backend_html5_HTML5AudioSource.play (HTML5AudioSource.hx:72)
    at lime_media_AudioSource.play (AudioSource.hx:71)
    at new openfl_media_SoundChannel (SoundChannel.hx:107)
    at openfl_media_Sound.play (Sound.hx:509)
...

What does this mean? Does it mean that howler doesn’t handle the exeption of a stop on a non-playing sound?


#2

#3

Well, it is not so reproducible for me :expressionless:
Uh, so I have to use that howler version… thanks!


#4

Let us know how a different version works if you use one :blush:


#5

If I only knew how to trigger the error, in my case it doesn’t behave like in the description.

How do I replace howler.min.js with howler.core.js?


#6

You can manually put it into html5/bin/lib folder and change index.html to load howler.core.js instead of howler.min.js.
Or you can create a template Index.html template (your topic).


#7

When running the app it tells me “ReferenceError: Howl is not defined”.
If it worked, .core is 770kb against the 32kb of .min :neutral_face:

Any suggestion? How do I replace the default howler.js?


#8

Replace the contents of howler.min.js in the Lime “dependencies” directory. That’s the simplest way to test it.

If it works, then we can minify and update our standard copy for everyone :slight_smile:


#9

i had the same isshue. Replaced howler.min.js content with ‘howler.core.js’ and problem was fixed.

InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable howler.min.js:2
pause ***howler.min.js:2:10497
e ***howler.min.js:4:9171
Howl.prototype.pos ***howler.min.js:4:3754
setPosition HTML5AudioSource.hx:307:78
play HTML5AudioSource.hx:72:2
play AudioSource.hx:71:2
openfl_media_SoundChannel SoundChannel.hx:107:3


#10

I have compiled replacing min with core in the dependencies folder, but now I get this message in the console

Uncaught SyntaxError: Unexpected token < howler.min.js:7

as core content is an html, not a js, right?


#11

No, howler.core.js should be a JS file. On Github, you may need to click the file, then click and save the “Raw” link to get the pure text


#12

Also, guys, if anyone has a chance to test on IE11, would be great to know if the stock version of Howler works so far, or if we still need our patch: https://github.com/goldfire/howler.js/pull/1052


#13

I can test on IE. With the latest fix (howler.core.js) it works fine.
Or do you want to test with another version?


#14

Yeah, if latest Howler dev version is stable on IE11, we can minify it and include it in Lime :slight_smile:


#15

Ok, now it works, I will try to understand if the problem is fixed, but listening to others it should.


#16

Version 2.1 of Howler is out.

I’d suggest using howler.core, not howler full, as it has cleaner sound (I don’t know why) and no odd bugs in Firefox which I had with howler full 2.0.15.


#17

Cleaner sound? Really? I noticed that the bugged version had a problem with frequencies, maybe you are referring to that problem.