Skip to content

Commit 4015efa

Browse files
committed
fix lk usage in test
1 parent f111c64 commit 4015efa

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"@formatjs/intl-segmenter": "^11.7.3",
3232
"@livekit/components-core": "^0.12.0",
3333
"@livekit/components-react": "^2.0.0",
34+
"@livekit/protocol": "^1.33.0",
3435
"@opentelemetry/api": "^1.4.0",
3536
"@opentelemetry/core": "^1.25.1",
3637
"@opentelemetry/exporter-trace-otlp-http": "^0.57.0",

src/tile/MediaView.test.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import {
1313
type TrackReference,
1414
type TrackReferencePlaceholder,
1515
} from "@livekit/components-core";
16-
import { Track, TrackPublication } from "livekit-client";
16+
import { LocalTrackPublication, Track } from "livekit-client";
17+
import { TrackInfo } from "@livekit/protocol";
1718
import { type ComponentProps } from "react";
1819

1920
import { MediaView } from "./MediaView";
@@ -28,7 +29,10 @@ describe("MediaView", () => {
2829
};
2930
const trackReference: TrackReference = {
3031
...trackReferencePlaceholder,
31-
publication: new TrackPublication(Track.Kind.Video, "id", "name"),
32+
publication: new LocalTrackPublication(
33+
Track.Kind.Video,
34+
new TrackInfo({ sid: "id", name: "name" }),
35+
),
3236
};
3337

3438
const baseProps: ComponentProps<typeof MediaView> = {

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1756,7 +1756,7 @@
17561756
resolved "https://registry.yarnpkg.com/@livekit/mutex/-/mutex-1.1.1.tgz#72492b611d55be8130ba2271b7a436d94b1bc6d4"
17571757
integrity sha512-EsshAucklmpuUAfkABPxJNhzj9v2sG7JuzFDL4ML1oJQSV14sqrpTYnsaOudMAw9yOaW53NU3QQTlUQoRs4czw==
17581758

1759-
"@livekit/[email protected]":
1759+
"@livekit/[email protected]", "@livekit/protocol@^1.33.0":
17601760
version "1.33.0"
17611761
resolved "https://registry.yarnpkg.com/@livekit/protocol/-/protocol-1.33.0.tgz#b8dfcf82ca501e747533d519e51b5c80176bf03e"
17621762
integrity sha512-361mBlFgI3nvn8oSQIL38gDUBGbOSwsEOqPgX0c1Jwz75/sD/TTvPeAM4zAz6OrV5Q4vI4Ruswecnyv5SG4oig==

0 commit comments

Comments
 (0)