diff --git a/guacamole-common-js/src/main/webapp/modules/AudioChannel.js b/guacamole-common-js/src/main/webapp/modules/AudioChannel.js index a18060636..8fe38e2e1 100644 --- a/guacamole-common-js/src/main/webapp/modules/AudioChannel.js +++ b/guacamole-common-js/src/main/webapp/modules/AudioChannel.js @@ -58,8 +58,10 @@ Guacamole.AudioChannel = function() { var now = Guacamole.AudioChannel.getTimestamp(); // If underflow is detected, reschedule new packets relative to now. - if (next_packet_time < now) + if (next_packet_time < now) { + duration += next_packet_time - now; next_packet_time = now; + } // Schedule next packet packet.play(next_packet_time);