added ability to track web sockets per session

This commit is contained in:
Luke Pulverenti 2013-05-09 13:38:02 -04:00
parent 9fa986c511
commit f4eb8f6cdd
4 changed files with 7 additions and 13 deletions

View File

@ -159,6 +159,9 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
webSocket.onopen = function () { webSocket.onopen = function () {
setTimeout(function () { setTimeout(function () {
self.sendWebSocketMessage("Identify", deviceId + "|" + clientName);
$(self).trigger("websocketopen"); $(self).trigger("websocketopen");
}, 500); }, 500);
}; };

View File

@ -570,8 +570,8 @@ form, .readOnlyContent {
} }
.clientNowPlayingImage { .clientNowPlayingImage {
border-radius: 5px; border: 1px solid #999;
border: 2px solid #ccc; padding: 1px;
} }
/* Footer */ /* Footer */

View File

@ -156,16 +156,7 @@
if (item) { if (item) {
if (item.BackdropImageTag) { if (item.PrimaryImageTag) {
var url = ApiClient.getImageUrl(item.Id, {
type: "Backdrop",
height: 100,
tag: item.BackdropImageTag
});
return "<img class='clientNowPlayingImage' src='" + url + "' alt='" + item.Name + "' title='" + item.Name + "' />";
}
else if (item.PrimaryImageTag) {
var url = ApiClient.getImageUrl(item.Id, { var url = ApiClient.getImageUrl(item.Id, {
type: "Primary", type: "Primary",

View File

@ -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.99" targetFramework="net45" /> <package id="MediaBrowser.ApiClient.Javascript" version="3.0.100" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.44" targetFramework="net45" /> <package id="ServiceStack.Common" version="3.9.44" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.44" targetFramework="net45" /> <package id="ServiceStack.Text" version="3.9.44" targetFramework="net45" />
</packages> </packages>