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(){
|
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.setAudioVolume(this.settings['audioVolume']);
|
||||||
this.sounds = {};
|
this.sounds = {};
|
||||||
for(var key in this.soundFiles) {
|
for(var key in this.soundFiles) {
|
||||||
|
@ -32,9 +28,11 @@ ajaxChat.loadHTML5Sounds=function(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ajaxChat.playHTML5Sound=function(soundID,soundFile){
|
ajaxChat.playHTML5Sound=function(soundID,soundFile){
|
||||||
this.audioObject.src = soundFile;
|
var snd = document.createElement('audio');
|
||||||
this.audioObject.play();
|
snd.src = soundFile;
|
||||||
|
snd.volume = this.html5AudioVolume;
|
||||||
|
snd.play();
|
||||||
}
|
}
|
||||||
ajaxChat.setHTML5SoundVolume=function(volume){
|
ajaxChat.setHTML5SoundVolume=function(volume){
|
||||||
this.audioObject.volume = volume;
|
this.html5AudioVolume = volume;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue