mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-805: Use start(), fall back to noteOn() if necessary.
This commit is contained in:
@@ -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 */
|
||||||
|
Reference in New Issue
Block a user