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

The method 'onStopped' isn't defined for the type 'QuickPlay'. #18

Closed
zxl777 opened this issue Jul 21, 2020 · 2 comments
Closed

The method 'onStopped' isn't defined for the type 'QuickPlay'. #18

zxl777 opened this issue Jul 21, 2020 · 2 comments

Comments

@zxl777
Copy link

zxl777 commented Jul 21, 2020

sounds: 1.0.0-beta.5

The method 'onStopped' isn't defined for the type 'QuickPlay'.

@bsutton
Copy link
Owner

bsutton commented Aug 6, 2020

This is by intent.
Its intended for short audio that you just start and forget.

If you want to stop audio then you need to use SoundPlayer.

@bsutton
Copy link
Owner

bsutton commented Aug 6, 2020

Actually I miss read this.

QuickPlay does have an onStopped setter:

var quickplay = QuickPlay(...);
quickplay.onStopped = ({bool wasUser}) => xxxx;

I do have some concerns about this method.

  1. wasUser makes no sense as a user can't stop a quick play. I'm like to remove the param before the next release.
  2. there is a 'slight' chance that the onStopped will never get call if the play completes before the onStopped method is set.
    I think this should be an argument to quickplay rather than a setter.

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

No branches or pull requests

3 participants