diff --git a/packages/core/package.json b/packages/core/package.json index ea45383a6..0076799cb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -45,7 +45,7 @@ }, "devDependencies": { "@livekit/components-styles": "workspace:*", - "@livekit/protocol": "^1.23.0", + "@livekit/protocol": "^1.36.1", "@microsoft/api-extractor": "^7.36.0", "@size-limit/file": "^11.0.2", "@size-limit/webpack": "^11.0.2", diff --git a/packages/core/src/track-reference/test-utils.ts b/packages/core/src/track-reference/test-utils.ts index 86435aa1a..abd30b599 100644 --- a/packages/core/src/track-reference/test-utils.ts +++ b/packages/core/src/track-reference/test-utils.ts @@ -4,10 +4,11 @@ * @internal */ -import { Participant, Track, TrackPublication } from 'livekit-client'; +import { Participant, RemoteTrackPublication, Track, TrackPublication } from 'livekit-client'; import type { UpdatableItem } from '../sorting/tile-array-update'; import type { TrackReference, TrackReferencePlaceholder } from './track-reference.types'; import { getTrackReferenceId } from './track-reference.utils'; +import { TrackInfo } from '@livekit/protocol'; // Test function: export const mockTrackReferencePlaceholder = ( @@ -21,10 +22,15 @@ export const mockTrackReferencePublished = (id: string, source: Track.Source): T const kind = [Track.Source.Camera, Track.Source.ScreenShare].includes(source) ? Track.Kind.Video : Track.Kind.Audio; + const trackInfo = new TrackInfo({ + sid: `${id}`, + name: `${id}`, + muted: false, + }); return { participant: new Participant(`${id}`, `${id}`), - // @ts-ignore - publication: new TrackPublication(kind, `${id}`, `${id}`), + // @ts-expect-error + publication: new RemoteTrackPublication(kind, trackInfo, true), source: source, }; }; @@ -43,10 +49,14 @@ export const mockTrackReferenceSubscribed = ( const kind = [Track.Source.Camera, Track.Source.ScreenShare].includes(source) ? Track.Kind.Video : Track.Kind.Audio; - - // @ts-ignore - const publication = new TrackPublication(kind, `${id}`, `${id}`); - // @ts-ignore + const trackInfo = new TrackInfo({ + sid: `${id}`, + name: `${id}`, + muted: false, + }); + // @ts-expect-error + const publication = new RemoteTrackPublication(kind, trackInfo, true); + // @ts-expect-error publication.track = {}; return { participant: options.mockParticipant diff --git a/packages/core/src/utilis.test.ts b/packages/core/src/utilis.test.ts index 4fecfb24d..f940b07a0 100644 --- a/packages/core/src/utilis.test.ts +++ b/packages/core/src/utilis.test.ts @@ -1,16 +1,26 @@ -import { Participant, Track, TrackPublication } from 'livekit-client'; +import { Participant, RemoteTrackPublication, Track } from 'livekit-client'; import { describe, it, expect } from 'vitest'; import { isTrackReferencePinned } from './track-reference'; import type { PinState } from './types'; +import { TrackInfo } from '@livekit/protocol'; describe('Test isTrackReferencePinned', () => { const participantA = new Participant('dummy-participant', 'A_id', 'track_A_name'); - // @ts-ignore - const trackA = new TrackPublication(Track.Kind.Video, 'track_A_id', 'track_A_name'); - trackA.trackSid = 'track_a_sid'; + const trackInfoA = new TrackInfo({ + sid: 'track_a_sid', + name: 'track_A_name', + muted: false, + }); + // @ts-expect-error + const trackA = new RemoteTrackPublication(Track.Kind.Video, trackInfoA, true); const participantB = new Participant('participant_B', 'B_id', 'B_name'); - // @ts-ignore - const trackB = new TrackPublication(Track.Kind.Video, 'track_B_id', 'track_B_name'); + const trackInfoB = new TrackInfo({ + sid: 'track_b_sid', + name: 'track_B_name', + muted: false, + }); + // @ts-expect-error + const trackB = new RemoteTrackPublication(Track.Kind.Video, trackInfoB, true); trackB.trackSid = 'track_b_sid'; const trackReferenceA = { participant: participantA, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1493b6773..ff1291678 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,7 +8,7 @@ catalogs: default: livekit-client: specifier: ^2.9.5 - version: 2.9.5 + version: 2.9.9 importers: @@ -64,7 +64,7 @@ importers: version: link:../../packages/styles livekit-client: specifier: 'catalog:' - version: 2.9.5 + version: 2.9.9 react: specifier: ^18.2.0 version: 18.3.1 @@ -128,10 +128,10 @@ importers: version: link:../../packages/styles '@livekit/track-processors': specifier: ^0.3.2 - version: 0.3.2(livekit-client@2.9.5) + version: 0.3.2(livekit-client@2.9.9) livekit-client: specifier: 'catalog:' - version: 2.9.5 + version: 2.9.9 livekit-server-sdk: specifier: ^2.6.1 version: 2.6.1 @@ -171,7 +171,7 @@ importers: version: 1.6.13 livekit-client: specifier: 'catalog:' - version: 2.9.5 + version: 2.9.9 loglevel: specifier: 1.9.1 version: 1.9.1 @@ -186,8 +186,8 @@ importers: specifier: workspace:* version: link:../styles '@livekit/protocol': - specifier: ^1.23.0 - version: 1.32.0 + specifier: ^1.36.1 + version: 1.36.1 '@microsoft/api-extractor': specifier: ^7.36.0 version: 7.49.2(@types/node@22.13.1) @@ -220,13 +220,13 @@ importers: version: link:../core '@livekit/krisp-noise-filter': specifier: ^0.2.12 - version: 0.2.12(livekit-client@2.9.5) + version: 0.2.12(livekit-client@2.9.9) clsx: specifier: 2.1.1 version: 2.1.1 livekit-client: specifier: 'catalog:' - version: 2.9.5 + version: 2.9.9 tslib: specifier: ^2.6.2 version: 2.8.1 @@ -236,7 +236,7 @@ importers: devDependencies: '@livekit/protocol': specifier: ^1.23.0 - version: 1.32.0 + version: 1.36.1 '@microsoft/api-extractor': specifier: ^7.35.0 version: 7.49.2(@types/node@22.13.1) @@ -2095,11 +2095,11 @@ packages: '@livekit/mutex@1.1.1': resolution: {integrity: sha512-EsshAucklmpuUAfkABPxJNhzj9v2sG7JuzFDL4ML1oJQSV14sqrpTYnsaOudMAw9yOaW53NU3QQTlUQoRs4czw==} - '@livekit/protocol@1.32.0': - resolution: {integrity: sha512-GXH59x4Zk5D7I9Bk5si+HiTP6R+I/Ynf1e+5rYRKkskgxdsnBdzCehF09qau55bEoGyVcmCQ4gmekHKetjEC3Q==} + '@livekit/protocol@1.34.0': + resolution: {integrity: sha512-bU7pCLAMRVTVZb1KSxA46q55bhOc4iATrY/gccy2/oX1D57tiZEI+8wGRWHeDwBb0UwnABu6JXzC4tTFkdsaOg==} - '@livekit/protocol@1.33.0': - resolution: {integrity: sha512-361mBlFgI3nvn8oSQIL38gDUBGbOSwsEOqPgX0c1Jwz75/sD/TTvPeAM4zAz6OrV5Q4vI4Ruswecnyv5SG4oig==} + '@livekit/protocol@1.36.1': + resolution: {integrity: sha512-nN3QnITAQ5yXk7UKfotH7CRWIlEozNWeKVyFJ0/+dtSzvWP/ib+10l1DDnRYi3A1yICJOGAKFgJ5d6kmi1HCUA==} '@livekit/track-processors@0.3.2': resolution: {integrity: sha512-4JUCzb7yIKoVsTo8J6FTzLZJHcI6DihfX/pGRDg0SOGaxprcDPrt8jaDBBTsnGBSXHeMxl2ugN+xQjdCWzLKEA==} @@ -6159,8 +6159,8 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - livekit-client@2.9.5: - resolution: {integrity: sha512-2EJmiB4XItaRjTEmL4XxGzsahLYTer9T5N6lKyhBHQxwH4GrjBWewPySvJEO8zCpD2nvWZCmCQjIJx0+w+y6DA==} + livekit-client@2.9.9: + resolution: {integrity: sha512-Mrm9Z/kPmJP5r4EMbzXPfB27gRP+tZtU7Zzen2o8u6w5N6FxaqXerRFqtXddGXaVzZouJOAg51/5A9u3saC/2A==} livekit-server-sdk@2.6.1: resolution: {integrity: sha512-j/8TOlahIyWnycNkuSzTv6q+win4JTbDGNH48iMsZDMnJBks9hhC9UwAO4ES42sAorIAxGkrH58hxt4KdTkZaQ==} @@ -10026,25 +10026,25 @@ snapshots: transitivePeerDependencies: - encoding - '@livekit/krisp-noise-filter@0.2.12(livekit-client@2.9.5)': + '@livekit/krisp-noise-filter@0.2.12(livekit-client@2.9.9)': dependencies: - livekit-client: 2.9.5 + livekit-client: 2.9.9 '@livekit/mutex@1.1.1': {} - '@livekit/protocol@1.32.0': + '@livekit/protocol@1.34.0': dependencies: '@bufbuild/protobuf': 1.10.0 - '@livekit/protocol@1.33.0': + '@livekit/protocol@1.36.1': dependencies: '@bufbuild/protobuf': 1.10.0 - '@livekit/track-processors@0.3.2(livekit-client@2.9.5)': + '@livekit/track-processors@0.3.2(livekit-client@2.9.9)': dependencies: '@mediapipe/holistic': 0.5.1675471629 '@mediapipe/tasks-vision': 0.10.9 - livekit-client: 2.9.5 + livekit-client: 2.9.9 '@manypkg/find-root@1.1.0': dependencies: @@ -15588,10 +15588,10 @@ snapshots: lines-and-columns@1.2.4: {} - livekit-client@2.9.5: + livekit-client@2.9.9: dependencies: '@livekit/mutex': 1.1.1 - '@livekit/protocol': 1.33.0 + '@livekit/protocol': 1.34.0 events: 3.3.0 loglevel: 1.9.2 sdp-transform: 2.15.0 @@ -15602,7 +15602,7 @@ snapshots: livekit-server-sdk@2.6.1: dependencies: - '@livekit/protocol': 1.32.0 + '@livekit/protocol': 1.36.1 camelcase-keys: 9.1.3 jose: 5.8.0