mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-28 18:15:37 -05:00
Change iOS to use native sound.
This is after the coding session with Paula - mostly just clean up of obsolete code and leftover debugging output.
This commit is contained in:
parent
6a6d92e06b
commit
e9d0d0d7be
4 changed files with 2 additions and 13 deletions
1
editions/free/src/app.bundle.js.map
Symbolic link
1
editions/free/src/app.bundle.js.map
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../src/build/bundles/app.bundle.js.map
|
|
@ -53,7 +53,6 @@ function indexFirstTime () {
|
|||
iOS.hidesplash(doit);
|
||||
}, 500);
|
||||
function doit () {
|
||||
ScratchAudio.sndFX('tap.wav');
|
||||
window.ontouchend = function () {
|
||||
indexLoadOptions();
|
||||
};
|
||||
|
@ -88,13 +87,6 @@ function indexLoadOptions () {
|
|||
}
|
||||
|
||||
function indexGohome () {
|
||||
// On iOS, sounds are loaded async, but the code as written expects to play tap.wav when we enter home.html
|
||||
// (but since it isn't loaded yet, no sound is played).
|
||||
// On Android, sync sounds means both calls to tap.wav result in a sound play.
|
||||
// XXX: we should re-write the lobby loading to wait for the sounds to load, and not play a sound here.
|
||||
if (isiOS) {
|
||||
ScratchAudio.sndFX('tap.wav');
|
||||
}
|
||||
iOS.setfile('homescroll.sjr', 0, function () {
|
||||
doNext();
|
||||
});
|
||||
|
|
|
@ -185,7 +185,6 @@ export default class iOS {
|
|||
|
||||
static registerSound (dir, name, fcn) {
|
||||
var result = tabletInterface.io_registersound(dir, name);
|
||||
console.log(result);
|
||||
if (fcn) {
|
||||
fcn(result);
|
||||
}
|
||||
|
@ -194,7 +193,6 @@ export default class iOS {
|
|||
|
||||
static playSound (name, fcn) {
|
||||
var result = tabletInterface.io_playsound(name);
|
||||
console.log(result); // eslint-disable-line no-console
|
||||
if (fcn) {
|
||||
fcn(result);
|
||||
}
|
||||
|
@ -210,8 +208,6 @@ export default class iOS {
|
|||
// Web Wiew delegate call backs
|
||||
|
||||
static soundDone (name) {
|
||||
console.log('soundDone callback, id:', name); // eslint-disable-line no-console
|
||||
|
||||
ScratchAudio.soundDone(name);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {isAndroid} from './lib';
|
||||
import ScratchAudio from './ScratchAudio';
|
||||
import iOS from '../iPad/iOS';
|
||||
|
||||
export default class Sound {
|
||||
constructor (name, time) {
|
||||
|
|
Loading…
Reference in a new issue