Skip to content

Commit ccbe603

Browse files
authored
Fixing replay after protocol dep bump (#687)
1 parent c843917 commit ccbe603

File tree

3 files changed

+27
-18
lines changed

3 files changed

+27
-18
lines changed

cmd/lk/replay.go

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ var (
4141
Name: "list",
4242
Before: createReplayClient,
4343
Action: listReplays,
44-
Flags: []cli.Flag{jsonFlag},
44+
Flags: []cli.Flag{
45+
jsonFlag,
46+
&cli.StringFlag{
47+
Name: "room",
48+
Usage: "Playback room name",
49+
Required: false,
50+
},
51+
},
4552
},
4653
{
4754
Name: "load",
@@ -135,7 +142,9 @@ func listReplays(ctx context.Context, cmd *cli.Command) error {
135142
return err
136143
}
137144

138-
req := &replay.ListReplaysRequest{}
145+
req := &replay.ListReplaysRequest{
146+
RoomName: cmd.String("room"),
147+
}
139148
res, err := replayClient.ListReplays(ctx, req)
140149
if err != nil {
141150
return err
@@ -160,12 +169,12 @@ func loadReplay(ctx context.Context, cmd *cli.Command) error {
160169
return err
161170
}
162171

163-
req := &replay.LoadReplayRequest{
164-
ReplayId: cmd.String("id"),
165-
RoomName: cmd.String("room"),
166-
StartingPts: int64(cmd.Int("pts")),
172+
req := &replay.PlaybackRequest{
173+
ReplayId: cmd.String("id"),
174+
RoomName: cmd.String("room"),
175+
StartTime: int64(cmd.Int("pts")),
167176
}
168-
res, err := replayClient.LoadReplay(ctx, req)
177+
res, err := replayClient.Playback(ctx, req)
169178
if err != nil {
170179
return err
171180
}
@@ -180,11 +189,11 @@ func seek(ctx context.Context, cmd *cli.Command) error {
180189
return err
181190
}
182191

183-
req := &replay.RoomSeekRequest{
192+
req := &replay.SeekRequest{
184193
PlaybackId: cmd.String("id"),
185-
Pts: int64(cmd.Int("pts")),
194+
StartTime: int64(cmd.Int("pts")),
186195
}
187-
_, err = replayClient.SeekForRoom(ctx, req)
196+
_, err = replayClient.Seek(ctx, req)
188197
return err
189198
}
190199

@@ -194,10 +203,10 @@ func closeReplay(ctx context.Context, cmd *cli.Command) error {
194203
return err
195204
}
196205

197-
req := &replay.CloseReplayRequest{
206+
req := &replay.ClosePlaybackRequest{
198207
PlaybackId: cmd.String("id"),
199208
}
200-
_, err = replayClient.CloseReplay(ctx, req)
209+
_, err = replayClient.Close(ctx, req)
201210
return err
202211
}
203212

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
github.com/go-logr/logr v1.4.3
1515
github.com/go-task/task/v3 v3.44.1
1616
github.com/joho/godotenv v1.5.1
17-
github.com/livekit/protocol v1.41.0
17+
github.com/livekit/protocol v1.41.1-0.20250922191558-7ca55b4334c9
1818
github.com/livekit/server-sdk-go/v2 v2.11.3
1919
github.com/moby/buildkit v0.23.2
2020
github.com/moby/patternmatcher v0.6.0
@@ -120,7 +120,7 @@ require (
120120
github.com/lithammer/shortuuid/v4 v4.2.0 // indirect
121121
github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731 // indirect
122122
github.com/livekit/mediatransportutil v0.0.0-20250825135402-7bc31f107ade // indirect
123-
github.com/livekit/psrpc v0.6.1-0.20250726180611-3915e005e741 // indirect
123+
github.com/livekit/psrpc v0.7.0 // indirect
124124
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
125125
github.com/magefile/mage v1.15.0 // indirect
126126
github.com/mattn/go-colorable v0.1.14 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,10 @@ github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731 h1:9x+U2HGLrSw5AT
274274
github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ=
275275
github.com/livekit/mediatransportutil v0.0.0-20250825135402-7bc31f107ade h1:lpxPcglwzUWNB4J0S2qZuyMehzmR7vW9whzSwV4IGoI=
276276
github.com/livekit/mediatransportutil v0.0.0-20250825135402-7bc31f107ade/go.mod h1:mSNtYzSf6iY9xM3UX42VEI+STHvMgHmrYzEHPcdhB8A=
277-
github.com/livekit/protocol v1.41.0 h1:aCMkM/MEmiZt7LRoZAfo1muZYjlioaw+NbVnkUDpgn8=
278-
github.com/livekit/protocol v1.41.0/go.mod h1:Scx8arfj5y65w6EYA3ZIKJafoN2xBuV8pauvyrvI4eg=
279-
github.com/livekit/psrpc v0.6.1-0.20250726180611-3915e005e741 h1:KKL1u94l6dF9u4cBwnnfozk27GH1txWy2SlvkfgmzoY=
280-
github.com/livekit/psrpc v0.6.1-0.20250726180611-3915e005e741/go.mod h1:AuDC5uOoEjQJEc69v4Li3t77Ocz0e0NdjQEuFfO+vfk=
277+
github.com/livekit/protocol v1.41.1-0.20250922191558-7ca55b4334c9 h1:xD69GyLf1oxMuEThna7NxkUSD8Ntunx/pBuqa7J6tPM=
278+
github.com/livekit/protocol v1.41.1-0.20250922191558-7ca55b4334c9/go.mod h1:vhMS30QoEyH2p34vi6X1eWkC4EMV72ZGZwQb74ajY7A=
279+
github.com/livekit/psrpc v0.7.0 h1:rtfqfjYN06WJYloE/S0nmkJ/Y04x4pxLQLe8kQ4FVHU=
280+
github.com/livekit/psrpc v0.7.0/go.mod h1:AuDC5uOoEjQJEc69v4Li3t77Ocz0e0NdjQEuFfO+vfk=
281281
github.com/livekit/server-sdk-go/v2 v2.11.3 h1:k+YDxo8wPCixRrS9fJHcbtlurlXhVLfyPva5Ne4tVH0=
282282
github.com/livekit/server-sdk-go/v2 v2.11.3/go.mod h1:ZRI95+32aJIC4BI0hV0h/XfHcX9Vrk7zcT2mKG1Q758=
283283
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=

0 commit comments

Comments
 (0)