Restored sound stacking in HTML5 audio backend for AJAX Chat.
This commit is contained in:
parent
97607adf85
commit
bc2f6d4b4f
1 changed files with 7 additions and 9 deletions
|
@ -21,10 +21,6 @@ ajaxChat.customInitialize = function() {
|
|||
}
|
||||
|
||||
ajaxChat.loadHTML5Sounds=function(){
|
||||
aO = document.createElement('audio');
|
||||
aO.id = 'audioObject';
|
||||
document.body.appendChild(aO);
|
||||
this.audioObject = document.getElementById('audioObject');
|
||||
this.setAudioVolume(this.settings['audioVolume']);
|
||||
this.sounds = {};
|
||||
for(var key in this.soundFiles) {
|
||||
|
@ -32,9 +28,11 @@ ajaxChat.loadHTML5Sounds=function(){
|
|||
}
|
||||
}
|
||||
ajaxChat.playHTML5Sound=function(soundID,soundFile){
|
||||
this.audioObject.src = soundFile;
|
||||
this.audioObject.play();
|
||||
var snd = document.createElement('audio');
|
||||
snd.src = soundFile;
|
||||
snd.volume = this.html5AudioVolume;
|
||||
snd.play();
|
||||
}
|
||||
ajaxChat.setHTML5SoundVolume=function(volume){
|
||||
this.audioObject.volume = volume;
|
||||
this.html5AudioVolume = volume;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue