GUAC-805: Use start(), fall back to noteOn() if necessary.

This commit is contained in:
Michael Jumper
2014-08-04 13:20:13 -07:00
parent a1452dd0b0
commit 5ae22ce206

View File

@@ -148,11 +148,15 @@ Guacamole.AudioChannel.Packet = function(mimetype, data) {
var source = Guacamole.AudioChannel.context.createBufferSource(); var source = Guacamole.AudioChannel.context.createBufferSource();
source.connect(Guacamole.AudioChannel.context.destination); source.connect(Guacamole.AudioChannel.context.destination);
// Use noteOn() instead of start() if necessary
if (!source.start)
source.start = source.noteOn;
var play_when; var play_when;
function playDelayed(buffer) { function playDelayed(buffer) {
source.buffer = buffer; source.buffer = buffer;
source.noteOn(play_when / 1000); source.start(play_when / 1000);
} }
/** @ignore */ /** @ignore */