mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 19:37:55 +02:00
the beginnings of remote control
This commit is contained in:
parent
2225ff4e6b
commit
6b180ba756
2 changed files with 37 additions and 2 deletions
|
@ -2589,7 +2589,6 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reports a user has stopped playing an item
|
* Reports a user has stopped playing an item
|
||||||
* @param {String} userId
|
* @param {String} userId
|
||||||
|
@ -2629,6 +2628,42 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
|
||||||
url: url
|
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);
|
}(jQuery, navigator, window.JSON, window.WebSocket, setTimeout);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.120" targetFramework="net45" />
|
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.122" targetFramework="net45" />
|
||||||
<package id="ServiceStack.Common" version="3.9.46" targetFramework="net45" />
|
<package id="ServiceStack.Common" version="3.9.46" targetFramework="net45" />
|
||||||
<package id="ServiceStack.Text" version="3.9.45" targetFramework="net45" />
|
<package id="ServiceStack.Text" version="3.9.45" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
Loading…
Reference in a new issue