1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

support sending out playstate commands

This commit is contained in:
Luke Pulverenti 2013-07-11 16:43:37 -04:00
parent c018f44379
commit 85ac0ffcd7
3 changed files with 86 additions and 5 deletions

View file

@ -3271,6 +3271,24 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
url: url
});
};
self.sendPlayStateCommand = function (sessionId, command, options) {
if (!sessionId) {
throw new Error("null sessionId");
}
if (!command) {
throw new Error("null command");
}
var url = self.getUrl("Sessions/" + sessionId + "/Playing/" + command, options || {});
return self.ajax({
type: "POST",
url: url
});
};
}
}(jQuery, navigator, window.JSON, window.WebSocket, setTimeout);