Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: remoting/webapp/client_plugin_async.js

Issue 11192042: Protocol plumbing for audio toggle. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/client_plugin.js ('k') | remoting/webapp/client_session.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/client_plugin_async.js
diff --git a/remoting/webapp/client_plugin_async.js b/remoting/webapp/client_plugin_async.js
index 9c21df095f76c84f240da6f5989aa5d22d13d956..e27983ccaaf58e490155d48bb0bc794ba5050c5c 100644
--- a/remoting/webapp/client_plugin_async.js
+++ b/remoting/webapp/client_plugin_async.js
@@ -399,6 +399,19 @@ remoting.ClientPluginAsync.prototype.pauseVideo =
};
/**
+ * Requests that the host pause or resume sending audio updates.
+ *
+ * @param {boolean} pause True to suspend audio updates, false otherwise.
+ */
+remoting.ClientPluginAsync.prototype.pauseAudio =
+ function(pause) {
+ if (!this.hasFeature(remoting.ClientPlugin.Feature.PAUSE_AUDIO))
+ return;
+ this.plugin.postMessage(JSON.stringify(
+ { method: 'pauseAudio', data: { pause: pause }}));
+};
+
+/**
* If we haven't yet received a "hello" message from the plugin, change its
* size so that the user can confirm it if click-to-play is enabled, or can
* see the "this plugin is disabled" message if it is actually disabled.
« no previous file with comments | « remoting/webapp/client_plugin.js ('k') | remoting/webapp/client_session.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698