diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-08-28 00:16:21 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-08-28 00:16:21 -0400 |
| commit | dfab2be6f598487828eac7f0343bc2b0842a8941 (patch) | |
| tree | 66ec944ebae2731efade6b3bcdc3567076061754 /MediaBrowser.WebDashboard/ApiClient.js | |
| parent | b19d0a14d3f9ff97df74423b58a34fcc558be8ad (diff) | |
added new remote control commands
Diffstat (limited to 'MediaBrowser.WebDashboard/ApiClient.js')
| -rw-r--r-- | MediaBrowser.WebDashboard/ApiClient.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js index 8a7db8b76..6262d760e 100644 --- a/MediaBrowser.WebDashboard/ApiClient.js +++ b/MediaBrowser.WebDashboard/ApiClient.js @@ -3465,6 +3465,42 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { }); }; + self.sendSystemCommand = function (sessionId, command) { + + if (!sessionId) { + throw new Error("null sessionId"); + } + + if (!command) { + throw new Error("null command"); + } + + var url = self.getUrl("Sessions/" + sessionId + "/System/" + command); + + return self.ajax({ + type: "POST", + url: url + }); + }; + + self.sendMessageCommand = function (sessionId, options) { + + if (!sessionId) { + throw new Error("null sessionId"); + } + + if (!options) { + throw new Error("null options"); + } + + var url = self.getUrl("Sessions/" + sessionId + "/Message", options); + + return self.ajax({ + type: "POST", + url: url + }); + }; + self.sendPlayStateCommand = function (sessionId, command, options) { if (!sessionId) { |
