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

the beginnings of remote control

This commit is contained in:
Luke Pulverenti 2013-05-29 00:00:24 -04:00
parent 57fed6b0ad
commit 5bb0338772
7 changed files with 246 additions and 34 deletions

View file

@ -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);