Release v2.12.0
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile, web, pulse-signage-web) (push) Successful in 2m6s
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile.player, player, pulse-signage-player) (push) Successful in 33s

This commit is contained in:
2026-09-11 17:22:31 +01:00
parent bdb5ab4bac
commit 0a03cdd0b7
32 changed files with 2211 additions and 18 deletions
+23 -1
View File
@@ -32,6 +32,7 @@ function createPlayerRuntime(options) {
const connectionsBySlug = new Map();
const dashboardListenersBySlug = new Map();
const announcementListenersBySlug = new Map();
const snapshotListeners = new Set();
const pendingCommandAcks = new Map();
const wss = new WebSocketServer({ noServer: true });
const staleConnectionMs = Number(options && options.staleConnectionMs) > 0
@@ -379,6 +380,12 @@ function createPlayerRuntime(options) {
} catch (_error) {
}
}
snapshotListeners.forEach(function (listener) {
try {
listener({ slug: key, connections: connections });
} catch (_error) {
}
});
if (!bucket || !bucket.size) {
return;
}
@@ -503,6 +510,10 @@ function createPlayerRuntime(options) {
const playerMatch = pathname.match(/^\/ws\/screens\/([^/]+)$/);
const announcementMatch = pathname.match(/^\/ws\/screens\/([^/]+)\/announcements$/);
if (pathname === '/local-control/ws') {
return;
}
if (!dashboardMatch && !playerMatch && !announcementMatch) {
socket.destroy();
return;
@@ -720,6 +731,16 @@ function createPlayerRuntime(options) {
server.on('upgrade', handleUpgrade);
}
function subscribeSnapshot(listener) {
if (typeof listener !== 'function') {
return function () {};
}
snapshotListeners.add(listener);
return function () {
snapshotListeners.delete(listener);
};
}
return {
installWebsocket: installWebsocket,
broadcastAnnouncementRefresh: broadcastAnnouncementRefresh,
@@ -728,7 +749,8 @@ function createPlayerRuntime(options) {
snapshotSlugs: snapshotSlugs,
isClientNameAvailableOnScreen: isClientNameAvailableOnScreen,
sendCommandToConnection: sendCommandToConnection,
broadcastCommand: broadcastCommand
broadcastCommand: broadcastCommand,
subscribeSnapshot: subscribeSnapshot
};
}