diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-29 00:00:24 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-29 00:00:24 -0400 |
| commit | 6b180ba756d116379b58640db4abbb30a97f74ad (patch) | |
| tree | 49d27b9169ebaeeb4a1dfb3bbc0e23f1ab2b738c /MediaBrowser.WebDashboard/ApiClient.js | |
| parent | 2225ff4e6b9b6bd4defc1f9e9ace4ac99651d250 (diff) | |
the beginnings of remote control
Diffstat (limited to 'MediaBrowser.WebDashboard/ApiClient.js')
| -rw-r--r-- | MediaBrowser.WebDashboard/ApiClient.js | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js index 2442141e6..572cb0cf2 100644 --- a/MediaBrowser.WebDashboard/ApiClient.js +++ b/MediaBrowser.WebDashboard/ApiClient.js @@ -2589,7 +2589,6 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { }); }; - /** * Reports a user has stopped playing an item * @param {String} userId @@ -2629,6 +2628,42 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { url: url }); }; + + self.sendBrowseCommand = function (sessionId, options) { + + if (!sessionId) { + throw new Error("null sessionId"); + } + + if (!options) { + throw new Error("null options"); + } + + var url = self.getUrl("Sessions/" + sessionId + "/Viewing", options); + + return self.ajax({ + type: "POST", + url: url + }); + }; + + self.sendPlayCommand = function (sessionId, options) { + + if (!sessionId) { + throw new Error("null sessionId"); + } + + if (!options) { + throw new Error("null options"); + } + + var url = self.getUrl("Sessions/" + sessionId + "/Playing", options); + + return self.ajax({ + type: "POST", + url: url + }); + }; } }(jQuery, navigator, window.JSON, window.WebSocket, setTimeout); |
