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
0 commit comments