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,20 +21,18 @@ 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){
|
||||
this.sounds[key] = this.dirs['sounds']+this.soundFiles[key];
|
||||
for(var key in this.soundFiles) {
|
||||
this.sounds[key] = this.dirs['sounds'] + this.soundFiles[key];
|
||||
}
|
||||
}
|
||||
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