mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-1511: Automatically open audio stream upon connect.
This commit is contained in:
@@ -149,6 +149,15 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector',
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* The mimetype of audio data to be sent along the Guacamole connection if
|
||||
* audio input is supported.
|
||||
*
|
||||
* @constant
|
||||
* @type String
|
||||
*/
|
||||
ManagedClient.AUDIO_INPUT_MIMETYPE = 'audio/L16;rate=44100,channels=2';
|
||||
|
||||
/**
|
||||
* Returns a promise which resolves with the string of connection
|
||||
* parameters to be passed to the Guacamole client during connection. This
|
||||
@@ -352,6 +361,12 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector',
|
||||
case 3:
|
||||
ManagedClientState.setConnectionState(managedClient.clientState,
|
||||
ManagedClientState.ConnectionState.CONNECTED);
|
||||
|
||||
// Begin streaming audio input if possible
|
||||
var stream = client.createAudioStream(ManagedClient.AUDIO_INPUT_MIMETYPE);
|
||||
if (!Guacamole.AudioRecorder.getInstance(stream, ManagedClient.AUDIO_INPUT_MIMETYPE))
|
||||
stream.sendEnd();
|
||||
|
||||
break;
|
||||
|
||||
// Update history when disconnecting
|
||||
|
Reference in New Issue
Block a user