@@ -25,6 +25,7 @@ import (
2525 authutil "github.com/livekit/livekit-cli/v2/pkg/auth"
2626 "github.com/livekit/livekit-cli/v2/pkg/util"
2727 "github.com/livekit/protocol/auth"
28+ "github.com/livekit/protocol/livekit"
2829 "github.com/livekit/protocol/replay"
2930 "github.com/livekit/server-sdk-go/v2/signalling"
3031)
4849 Usage : "Playback room name" ,
4950 Required : false ,
5051 },
52+ & cli.StringFlag {
53+ Name : "token" ,
54+ Usage : "Pagination token" ,
55+ Required : false ,
56+ },
5157 },
5258 },
5359 {
6672 Required : true ,
6773 },
6874 & cli.IntFlag {
69- Name : "pts " ,
75+ Name : "offset " ,
7076 Usage : "Playback start time" ,
7177 Required : false ,
7278 },
8389 Required : true ,
8490 },
8591 & cli.IntFlag {
86- Name : "pts " ,
92+ Name : "offset " ,
8793 Usage : "Playback start time" ,
8894 Required : true ,
8995 },
@@ -145,6 +151,10 @@ func listReplays(ctx context.Context, cmd *cli.Command) error {
145151 req := & replay.ListReplaysRequest {
146152 RoomName : cmd .String ("room" ),
147153 }
154+ if token := cmd .String ("token" ); token != "" {
155+ req .PageToken = & livekit.TokenPagination {Token : token }
156+ }
157+
148158 res , err := replayClient .ListReplays (ctx , req )
149159 if err != nil {
150160 return err
@@ -170,9 +180,9 @@ func loadReplay(ctx context.Context, cmd *cli.Command) error {
170180 }
171181
172182 req := & replay.PlaybackRequest {
173- ReplayId : cmd .String ("id" ),
174- RoomName : cmd .String ("room" ),
175- StartTime : int64 (cmd .Int ("pts" )),
183+ ReplayId : cmd .String ("id" ),
184+ PlaybackRoom : cmd .String ("room" ),
185+ SeekOffset : int64 (cmd .Int ("pts" )),
176186 }
177187 res , err := replayClient .Playback (ctx , req )
178188 if err != nil {
@@ -191,7 +201,7 @@ func seek(ctx context.Context, cmd *cli.Command) error {
191201
192202 req := & replay.SeekRequest {
193203 PlaybackId : cmd .String ("id" ),
194- StartTime : int64 (cmd .Int ("pts" )),
204+ SeekOffset : int64 (cmd .Int ("pts" )),
195205 }
196206 _ , err = replayClient .Seek (ctx , req )
197207 return err
0 commit comments