Skip to content

Commit eea1633

Browse files
Update LiveKit dependencies (non-major) (#1099)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: lukasIO <mail@lukasseiler.de>
1 parent 5b9b3ad commit eea1633

File tree

4 files changed

+59
-39
lines changed

4 files changed

+59
-39
lines changed

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
},
4646
"devDependencies": {
4747
"@livekit/components-styles": "workspace:*",
48-
"@livekit/protocol": "^1.23.0",
48+
"@livekit/protocol": "^1.36.1",
4949
"@microsoft/api-extractor": "^7.36.0",
5050
"@size-limit/file": "^11.0.2",
5151
"@size-limit/webpack": "^11.0.2",

packages/core/src/track-reference/test-utils.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
* @internal
55
*/
66

7-
import { Participant, Track, TrackPublication } from 'livekit-client';
7+
import { Participant, RemoteTrackPublication, Track, TrackPublication } from 'livekit-client';
88
import type { UpdatableItem } from '../sorting/tile-array-update';
99
import type { TrackReference, TrackReferencePlaceholder } from './track-reference.types';
1010
import { getTrackReferenceId } from './track-reference.utils';
11+
import { TrackInfo } from '@livekit/protocol';
1112

1213
// Test function:
1314
export const mockTrackReferencePlaceholder = (
@@ -21,10 +22,15 @@ export const mockTrackReferencePublished = (id: string, source: Track.Source): T
2122
const kind = [Track.Source.Camera, Track.Source.ScreenShare].includes(source)
2223
? Track.Kind.Video
2324
: Track.Kind.Audio;
25+
const trackInfo = new TrackInfo({
26+
sid: `${id}`,
27+
name: `${id}`,
28+
muted: false,
29+
});
2430
return {
2531
participant: new Participant(`${id}`, `${id}`),
26-
// @ts-ignore
27-
publication: new TrackPublication(kind, `${id}`, `${id}`),
32+
// @ts-expect-error
33+
publication: new RemoteTrackPublication(kind, trackInfo, true),
2834
source: source,
2935
};
3036
};
@@ -43,10 +49,14 @@ export const mockTrackReferenceSubscribed = (
4349
const kind = [Track.Source.Camera, Track.Source.ScreenShare].includes(source)
4450
? Track.Kind.Video
4551
: Track.Kind.Audio;
46-
47-
// @ts-ignore
48-
const publication = new TrackPublication(kind, `${id}`, `${id}`);
49-
// @ts-ignore
52+
const trackInfo = new TrackInfo({
53+
sid: `${id}`,
54+
name: `${id}`,
55+
muted: false,
56+
});
57+
// @ts-expect-error
58+
const publication = new RemoteTrackPublication(kind, trackInfo, true);
59+
// @ts-expect-error
5060
publication.track = {};
5161
return {
5262
participant: options.mockParticipant

packages/core/src/utilis.test.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1-
import { Participant, Track, TrackPublication } from 'livekit-client';
1+
import { Participant, RemoteTrackPublication, Track } from 'livekit-client';
22
import { describe, it, expect } from 'vitest';
33
import { isTrackReferencePinned } from './track-reference';
44
import type { PinState } from './types';
5+
import { TrackInfo } from '@livekit/protocol';
56

67
describe('Test isTrackReferencePinned', () => {
78
const participantA = new Participant('dummy-participant', 'A_id', 'track_A_name');
8-
// @ts-ignore
9-
const trackA = new TrackPublication(Track.Kind.Video, 'track_A_id', 'track_A_name');
10-
trackA.trackSid = 'track_a_sid';
9+
const trackInfoA = new TrackInfo({
10+
sid: 'track_a_sid',
11+
name: 'track_A_name',
12+
muted: false,
13+
});
14+
// @ts-expect-error
15+
const trackA = new RemoteTrackPublication(Track.Kind.Video, trackInfoA, true);
1116
const participantB = new Participant('participant_B', 'B_id', 'B_name');
12-
// @ts-ignore
13-
const trackB = new TrackPublication(Track.Kind.Video, 'track_B_id', 'track_B_name');
17+
const trackInfoB = new TrackInfo({
18+
sid: 'track_b_sid',
19+
name: 'track_B_name',
20+
muted: false,
21+
});
22+
// @ts-expect-error
23+
const trackB = new RemoteTrackPublication(Track.Kind.Video, trackInfoB, true);
1424
trackB.trackSid = 'track_b_sid';
1525
const trackReferenceA = {
1626
participant: participantA,

pnpm-lock.yaml

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)