update hdhr stream
This commit is contained in:
parent
d1f8d6afc2
commit
d808aced1d
5 changed files with 61 additions and 21 deletions
|
@ -16,12 +16,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.2.19",
|
||||
"_release": "1.2.19",
|
||||
"version": "1.2.21",
|
||||
"_release": "1.2.21",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.2.19",
|
||||
"commit": "31e70d0eb2beebfcff7817b4e91177fbc16962b5"
|
||||
"tag": "1.2.21",
|
||||
"commit": "562008a40ddd38451acd2eaee618541fbf3472d3"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.0",
|
||||
|
|
|
@ -127,9 +127,7 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focus
|
|||
|
||||
var apiClient = this;
|
||||
|
||||
if (msg.MessageType === "LibraryChanged") {
|
||||
}
|
||||
else if (msg.MessageType === "Play") {
|
||||
if (msg.MessageType === "Play") {
|
||||
|
||||
var serverId = apiClient.serverInfo().Id;
|
||||
|
||||
|
@ -143,10 +141,6 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focus
|
|||
playbackManager.play({ ids: msg.Data.ItemIds, startPositionTicks: msg.Data.StartPositionTicks, serverId: serverId });
|
||||
}
|
||||
}
|
||||
else if (msg.MessageType === "ServerShuttingDown") {
|
||||
}
|
||||
else if (msg.MessageType === "ServerRestarting") {
|
||||
}
|
||||
else if (msg.MessageType === "Playstate") {
|
||||
|
||||
if (msg.Data.Command === 'Stop') {
|
||||
|
@ -172,8 +166,6 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focus
|
|||
var cmd = msg.Data;
|
||||
processGeneralCommand(cmd);
|
||||
}
|
||||
else if (msg.MessageType === "RestartRequired") {
|
||||
}
|
||||
}
|
||||
|
||||
function bindEvents(apiClient) {
|
||||
|
|
48
dashboard-ui/bower_components/emby-webcomponents/servernotifications.js
vendored
Normal file
48
dashboard-ui/bower_components/emby-webcomponents/servernotifications.js
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
define(['connectionManager', 'events'], function (connectionManager, events) {
|
||||
|
||||
var serverNotifications = {};
|
||||
|
||||
function onWebSocketMessageReceived(e, msg) {
|
||||
|
||||
var apiClient = this;
|
||||
|
||||
if (msg.MessageType === "LibraryChanged") {
|
||||
}
|
||||
else if (msg.MessageType === "ServerShuttingDown") {
|
||||
events.trigger(serverNotifications, 'ServerShuttingDown', [apiClient]);
|
||||
}
|
||||
else if (msg.MessageType === "ServerRestarting") {
|
||||
events.trigger(serverNotifications, 'ServerRestarting', [apiClient]);
|
||||
}
|
||||
else if (msg.MessageType === "RestartRequired") {
|
||||
events.trigger(serverNotifications, 'RestartRequired', [apiClient]);
|
||||
}
|
||||
else if (msg.MessageType === "UserDataChanged") {
|
||||
|
||||
if (msg.Data.UserId == apiClient.getCurrentUserId()) {
|
||||
|
||||
for (var i = 0, length = msg.Data.UserDataList.length; i < length; i++) {
|
||||
events.trigger(serverNotifications, 'UserDataChanged', [apiClient, msg.Data.UserDataList[i]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function bindEvents(apiClient) {
|
||||
|
||||
events.off(apiClient, "websocketmessage", onWebSocketMessageReceived);
|
||||
events.on(apiClient, "websocketmessage", onWebSocketMessageReceived);
|
||||
}
|
||||
|
||||
//var current = connectionManager.currentApiClient();
|
||||
//if (current) {
|
||||
// bindEvents(current);
|
||||
//}
|
||||
|
||||
events.on(connectionManager, 'apiclientcreated', function (e, newApiClient) {
|
||||
|
||||
bindEvents(newApiClient);
|
||||
});
|
||||
|
||||
return serverNotifications;
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue