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

playSound() callback plus audio preload cleanup #25187

Merged
merged 3 commits into from Oct 3, 2018

Conversation

cpirich
Copy link
Contributor

@cpirich cpirich commented Oct 2, 2018

  • playSound() now has a 3rd parameter (callback) - undocumented for student use. The callback function will be called when the sound starts playing. This will be used by hoc dance party so we can synchronize with the playing audio.
  • Updated our playSound() unit tests to be aware of this change.
  • Gamelab and Dancelab will now call register() on all preloaded sounds. This means that they will not only be preloaded into the browser cache, but will also be brought into memory so that we increase the likelihood that the sound will play immediately when the student presses the Run button.
  • Moved the "preload asset list" portion of the level builder UI into the right place so that it appears for both droplet and blockly levels.

@cpirich
Copy link
Contributor Author

cpirich commented Oct 2, 2018

@mrjoshida FYI

Copy link
Contributor

@islemaster islemaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔊 🎉

@cpirich cpirich merged commit c740f28 into staging Oct 3, 2018
@cpirich cpirich deleted the playSound-callback-plus-audio-preload-cleanup branch October 3, 2018 00:20
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.

None yet

3 participants