mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-28 18:15:37 -05:00
Provide top-level window.ScratchAudio to iframes
This commit is contained in:
parent
b8f4e84bc9
commit
9814b2a7ce
2 changed files with 4 additions and 2 deletions
|
@ -226,7 +226,7 @@ function inappInterfaceGuide () {
|
|||
currentButton.className = 'interface-button';
|
||||
currentButton = target.parentNode;
|
||||
currentButton.className = currentButton.className + ' interface-button-selected';
|
||||
ScratchAudio.sndFXWithVolume('keydown.wav', 0.3);
|
||||
window.parent.ScratchAudio.sndFXWithVolume('keydown.wav', 0.3);
|
||||
}
|
||||
};
|
||||
document.addEventListener('touchstart', switchHelp, false);
|
||||
|
@ -276,7 +276,7 @@ function inappPaintEditorGuide () {
|
|||
currentButton.className = 'paint-button';
|
||||
currentButton = target.parentNode;
|
||||
currentButton.className = currentButton.className + ' paint-button-selected';
|
||||
ScratchAudio.sndFXWithVolume('keydown.wav', 0.3);
|
||||
window.parent.ScratchAudio.sndFXWithVolume('keydown.wav', 0.3);
|
||||
}
|
||||
};
|
||||
document.addEventListener('touchstart', switchHelp, false);
|
||||
|
|
|
@ -183,4 +183,6 @@ export default class ScratchAudio {
|
|||
}
|
||||
}
|
||||
|
||||
window.ScratchAudio = ScratchAudio;
|
||||
|
||||
window.addEventListener('touchend', ScratchAudio.firstOnTouchEnd, false);
|
||||
|
|
Loading…
Reference in a new issue