Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent failure to play full sound #304

Open
samredfern opened this issue Jul 23, 2018 · 2 comments
Open

Intermittent failure to play full sound #304

samredfern opened this issue Jul 23, 2018 · 2 comments
Labels

Comments

@samredfern
Copy link

samredfern commented Jul 23, 2018

I'm using SoundJs in createjs-2015.11.26
I'm aware that this is quite old, but it's the one still used by Adobe Animate when exporting to HTML5. I've tried createjs 1.0 but this causes graphical errors with Animate.

The symptom is that occasionally a sound will start playing and then cut off. It's a fairly rare occurrence.
I have been unable to find any particular pattern to this. It can be a long sound or a short sound. It happens both when using localhost or a real internet connection. It does appear to be a soundjs issue rather than Adobe Animate, since it can also happen when I play audio directly from my own code (i.e. not from the Animate-generated code). It can happen on a very simple Adobe Animate export, so I'm sure it's not some other interaction with my code. I'm using the default playback (WebAudio).. I tried HTMLAudio too but that didn't work correctly for me on Android.

The problem has happened on a variety of devices (Windows, iOS, Android) and on a variety of browsers (Firefox, Chrome)

When the error happens, the audio file is reporting a correct duration and nothing abnormal appears to have happened during the download, i.e. it seems like a playback issue.

Edit: in fact, this may be a duplicate of #302
I have found Chrome is much more often causing the issue, and Firefox very rarely.
On this test file we're getting audio cut off almost every time on Chrome: http://www.psychicsoftware.com/newbychinese/test/NiHao.html

@lannymcnie
Copy link
Member

You should be able to swap out ONLY the 1.0 SoundJS library (you will have to split up the libs into separate ones, instead of loading the single combined source.

I am interested in why its not working, and suspect 1.0 won't solve the problem, since as far as I know there are no fixed for any issue like that in SoundJS. It would also be handy to put together a simple test with your audio that shows the issue so we can solve it if possible.

I am also interested in what is not working in Animate drawing. Any chance you can share a sample? We are hoping 1.0 can be dropped in to replace 0.8.2 (latest Easel/Tween), and Adobe may be including 1.0 by default in the next version of Animate.

Cheers.

@lannymcnie lannymcnie added the bug label Jul 24, 2018
@samredfern
Copy link
Author

Regarding the audio problem, it seems to be a Chrome thing, related to #302

This example goes wrong nearly every time on Chrome, but it's fine on Firefox (it's using createjs2015.11.26): http://www.psychicsoftware.com/newbychinese/test/NiHao.html

And here I have changed the library to Createjs1.0.0; the error still happens on Chrome:
http://www.psychicsoftware.com/newbychinese/test/NiHao-newcreatejs.html

I have occasionally seen sound cut-offs in Firefox too, but there's no example I can give because it's intermittent/unpredictable. Much more common on Chrome. Probably unrelated.


Regarding the graphical glitches in createjs1.0.0, here's a sample we exported from Animate, using createjs2015.11.26, and then changed to use createjs1.0.0:

http://www.psychicsoftware.com/newbychinese/test2/7a-PERSON-ren-oldcreatejs.html
http://www.psychicsoftware.com/newbychinese/test2/7a-PERSON-ren.html

Near the end, after the motorbike goes offscreen and crashes, then a tyre bounces past the character, you'll see his legs disappear when using createjs1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants