Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static function unlockSound(): Void {
- if (!soundEnabled) {
- var context = kha.audio2.Audio._context;
- if (context == null) {
- context = untyped __js__('kha_audio2_Audio1._context');
- }
- if (context != null) {
- context.resume().then(function (c) {
- soundEnabled = true;
- // trace('sound enabled');
- }).catchError(function( err ) {
- trace(err);
- });
- }
- }
- unlockiOSSound();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement