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

Unified Diff: remoting/webapp/client_plugin.js

Issue 307463005: Client-side changes to support requesting lossless encode & color. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix pauseVideo stub Created 6 years, 7 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/client/plugin/chromoting_instance.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/client_plugin.js
diff --git a/remoting/webapp/client_plugin.js b/remoting/webapp/client_plugin.js
index c2c15f2a6b4ec0d7061fa8ce694df63938579dd3..7319e6b4f30fee7484337bb5d165e3e0b521c34c 100644
--- a/remoting/webapp/client_plugin.js
+++ b/remoting/webapp/client_plugin.js
@@ -104,7 +104,8 @@ remoting.ClientPlugin.Feature = {
TRAP_KEY: 'trapKey',
PINLESS_AUTH: 'pinlessAuth',
EXTENSION_MESSAGE: 'extensionMessage',
- MEDIA_SOURCE_RENDERING: 'mediaSourceRendering'
+ MEDIA_SOURCE_RENDERING: 'mediaSourceRendering',
+ VIDEO_CONTROL: 'videoControl'
};
/**
@@ -548,11 +549,13 @@ remoting.ClientPlugin.prototype.notifyClientResolution =
*/
remoting.ClientPlugin.prototype.pauseVideo =
function(pause) {
- if (!this.hasFeature(remoting.ClientPlugin.Feature.PAUSE_VIDEO)) {
- return;
+ if (this.hasFeature(remoting.ClientPlugin.Feature.VIDEO_CONTROL)) {
+ this.plugin.postMessage(JSON.stringify(
+ { method: 'videoControl', data: { pause: pause }}));
+ } else if (this.hasFeature(remoting.ClientPlugin.Feature.PAUSE_VIDEO)) {
+ this.plugin.postMessage(JSON.stringify(
+ { method: 'pauseVideo', data: { pause: pause }}));
}
- this.plugin.postMessage(JSON.stringify(
- { method: 'pauseVideo', data: { pause: pause }}));
};
/**
@@ -570,6 +573,34 @@ remoting.ClientPlugin.prototype.pauseAudio =
};
/**
+ * Requests that the host configure the video codec for lossless encode.
+ *
+ * @param {boolean} wantLossless True to request lossless encoding.
+ */
+remoting.ClientPlugin.prototype.setLosslessEncode =
+ function(wantLossless) {
+ if (!this.hasFeature(remoting.ClientPlugin.Feature.VIDEO_CONTROL)) {
+ return;
+ }
+ this.plugin.postMessage(JSON.stringify(
+ { method: 'videoControl', data: { losslessEncode: wantLossless }}));
+};
+
+/**
+ * Requests that the host configure the video codec for lossless color.
+ *
+ * @param {boolean} wantLossless True to request lossless color.
+ */
+remoting.ClientPlugin.prototype.setLosslessColor =
+ function(wantLossless) {
+ if (!this.hasFeature(remoting.ClientPlugin.Feature.VIDEO_CONTROL)) {
+ return;
+ }
+ this.plugin.postMessage(JSON.stringify(
+ { method: 'videoControl', data: { losslessColor: wantLossless }}));
+};
+
+/**
* Called when a PIN is obtained from the user.
*
* @param {string} pin The PIN.
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698