mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added new remote control commands
This commit is contained in:
parent
394887de50
commit
ce67f87714
2 changed files with 37 additions and 1 deletions
36
ApiClient.js
36
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue