mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
GUAC-1354: Use Guacamole.AudioPlayer.getInstance(), etc. to abstract away the various implementations.
This commit is contained in:
@@ -635,13 +635,11 @@ Guacamole.Client = function(tunnel) {
|
||||
if (guac_client.onaudio)
|
||||
audioPlayer = guac_client.onaudio(stream, mimetype);
|
||||
|
||||
// If unsuccessful, use a default implementation
|
||||
if (!audioPlayer) {
|
||||
if (Guacamole.RawAudioPlayer.isSupportedType(mimetype))
|
||||
audioPlayer = new Guacamole.RawAudioPlayer(stream, mimetype);
|
||||
}
|
||||
// If unsuccessful, try to use a default implementation
|
||||
if (!audioPlayer)
|
||||
audioPlayer = Guacamole.AudioPlayer.getInstance(stream, mimetype);
|
||||
|
||||
// If player somehow successfully retrieved, send success response
|
||||
// If we have successfully retrieved an audio player, send success response
|
||||
if (audioPlayer) {
|
||||
audioPlayers[stream_index] = audioPlayer;
|
||||
guac_client.sendAck(stream_index, "OK", 0x0000);
|
||||
|
Reference in New Issue
Block a user