Add native Roku integration

This commit is contained in:
2026-05-05 12:32:02 +00:00
parent 5efb2f6760
commit 1f5ab6802d
12 changed files with 631 additions and 30 deletions
+20
View File
@@ -0,0 +1,20 @@
import { expect, tap } from '@git.zone/tstest/tapbundle';
import { createRokuDiscoveryDescriptor } from '../../ts/integrations/roku/index.js';
tap.test('matches Roku ECP SSDP records', async () => {
const descriptor = createRokuDiscoveryDescriptor();
const matcher = descriptor.getMatchers()[0];
const result = await matcher.matches({
st: 'roku:ecp',
usn: 'uuid:roku-ecp-123456::roku:ecp',
location: 'http://192.168.1.60:8060/',
headers: {
manufacturer: 'Roku',
},
}, {});
expect(result.matched).toBeTrue();
expect(result.candidate?.host).toEqual('192.168.1.60');
expect(result.normalizedDeviceId).toEqual('roku-ecp-123456');
});
export default tap.start();