You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2016/03/30 22:20:38 UTC
[4/5] incubator-guacamole-client git commit: GUAC-1511: Automatically
open audio stream upon connect.
GUAC-1511: Automatically open audio stream upon connect.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/900c8f2a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/900c8f2a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/900c8f2a
Branch: refs/heads/master
Commit: 900c8f2a276e42f6aefc3463e551e1ce25c8af42
Parents: 076995d
Author: Michael Jumper <mj...@apache.org>
Authored: Wed Mar 30 10:00:58 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Wed Mar 30 11:22:54 2016 -0700
----------------------------------------------------------------------
.../main/webapp/app/client/types/ManagedClient.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/900c8f2a/guacamole/src/main/webapp/app/client/types/ManagedClient.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/types/ManagedClient.js b/guacamole/src/main/webapp/app/client/types/ManagedClient.js
index fab359f..64418e0 100644
--- a/guacamole/src/main/webapp/app/client/types/ManagedClient.js
+++ b/guacamole/src/main/webapp/app/client/types/ManagedClient.js
@@ -150,6 +150,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
* string generally contains the desired connection ID, display resolution,
@@ -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