Release v2.10.6
This commit is contained in:
@@ -33,3 +33,37 @@ test('playlist notifications use the player URL reported by the screen connectio
|
||||
command: 'refresh'
|
||||
}]);
|
||||
});
|
||||
|
||||
test('playlist notifications use the bridge device route for remote player connections', async () => {
|
||||
const calls = [];
|
||||
const notify = createNotifyPlayerScreens(
|
||||
async function () {
|
||||
calls.push({ type: 'fallback' });
|
||||
return { ok: true };
|
||||
},
|
||||
async function () {
|
||||
return {
|
||||
connections: [{ playerDeviceId: 'remote-player-1', playerPublicBaseUrl: 'https://remote.example' }]
|
||||
};
|
||||
},
|
||||
async function () {
|
||||
calls.push({ type: 'base-url' });
|
||||
return { ok: true };
|
||||
},
|
||||
async function () {
|
||||
return 'http://player:8081';
|
||||
},
|
||||
async function (deviceId, payload) {
|
||||
calls.push({ deviceId, payload });
|
||||
return { ok: true };
|
||||
}
|
||||
);
|
||||
|
||||
const count = await notify(['remote-screen'], 'refresh');
|
||||
|
||||
assert.equal(count, 1);
|
||||
assert.deepEqual(calls, [{
|
||||
deviceId: 'remote-player-1',
|
||||
payload: { command: 'refresh', screenSlug: 'remote-screen' }
|
||||
}]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user