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

fix play to avoid starting from beginning after pause #1102

Closed
wants to merge 1 commit into from
Closed

fix play to avoid starting from beginning after pause #1102

wants to merge 1 commit into from

Conversation

ardeois
Copy link

@ardeois ardeois commented Dec 17, 2018

When playing a 'paused' howl, we were instanciating a new sound every
time.
Instead we should use the existing sound if:

  • _paused === true
  • _ended === false

This basically rollbacks this commit be4e445#diff-1e099b745600c69cbaacbe86736975fc

fixes #1101

@ardeois ardeois changed the title fix play to start from beginning after pause fix play to avoid starting from beginning after pause Dec 17, 2018
When playing a 'paused' howl, we were instanciating a new `sound` every
time.
Instead we should use the existing `sound` if:
 - `_paused === true`
 - `_ended === false`

This basically rollbacks this commit be4e445#diff-1e099b745600c69cbaacbe86736975fc

fixes #1101
@ardeois
Copy link
Author

ardeois commented Dec 18, 2018

@goldfire if you have some time to check this, that would be great !
2.1.0 actually fixes our issues with audio locking, but #1101 block us from using it

@goldfire
Copy link
Owner

This causes #1060 to happen again, which is why that code was removed in the first place.

@ardeois
Copy link
Author

ardeois commented Dec 19, 2018

Interesting, but I don't understand the #1060 bug
when doing:

var sound = new Howl({
 src: [intro, backAudio],
 ...

shouldn't we assume intro and backAudio to be the same sound, but in different formats?
I though src is made to provide different file formats of the same sound for browser compatibility

@goldfire goldfire closed this in d22ddcf Dec 19, 2018
@goldfire
Copy link
Owner

Both should now be fixed with d22ddcf, but let me know if it still isn't working for you.

@ardeois
Copy link
Author

ardeois commented Dec 19, 2018

Perfect thank you ! I'll take a look

@ardeois
Copy link
Author

ardeois commented Dec 19, 2018

yes I confirm it's working thanks @goldfire !
I'll wait for an official 2.1.1 build to update our app

obiot added a commit to melonjs/melonJS that referenced this pull request Dec 20, 2018
@clementdevos
Copy link

@goldfire do you plan on releasing this soon?

@goldfire
Copy link
Owner

@clementdevos Yes, we've got a big update to one of our games today and then I plan on getting a 2.1.1 release out either today or tomorrow.

@ardeois ardeois deleted the fix/play-pause branch August 27, 2019 16:26
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.

seek no longer works in 2.1.0
3 participants