@@ -25,6 +25,7 @@ import (
25
25
authutil "github.com/livekit/livekit-cli/v2/pkg/auth"
26
26
"github.com/livekit/livekit-cli/v2/pkg/util"
27
27
"github.com/livekit/protocol/auth"
28
+ "github.com/livekit/protocol/livekit"
28
29
"github.com/livekit/protocol/replay"
29
30
"github.com/livekit/server-sdk-go/v2/signalling"
30
31
)
48
49
Usage : "Playback room name" ,
49
50
Required : false ,
50
51
},
52
+ & cli.StringFlag {
53
+ Name : "token" ,
54
+ Usage : "Pagination token" ,
55
+ Required : false ,
56
+ },
51
57
},
52
58
},
53
59
{
66
72
Required : true ,
67
73
},
68
74
& cli.IntFlag {
69
- Name : "pts " ,
75
+ Name : "offset " ,
70
76
Usage : "Playback start time" ,
71
77
Required : false ,
72
78
},
83
89
Required : true ,
84
90
},
85
91
& cli.IntFlag {
86
- Name : "pts " ,
92
+ Name : "offset " ,
87
93
Usage : "Playback start time" ,
88
94
Required : true ,
89
95
},
@@ -145,6 +151,10 @@ func listReplays(ctx context.Context, cmd *cli.Command) error {
145
151
req := & replay.ListReplaysRequest {
146
152
RoomName : cmd .String ("room" ),
147
153
}
154
+ if token := cmd .String ("token" ); token != "" {
155
+ req .PageToken = & livekit.TokenPagination {Token : token }
156
+ }
157
+
148
158
res , err := replayClient .ListReplays (ctx , req )
149
159
if err != nil {
150
160
return err
@@ -170,9 +180,9 @@ func loadReplay(ctx context.Context, cmd *cli.Command) error {
170
180
}
171
181
172
182
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" )),
176
186
}
177
187
res , err := replayClient .Playback (ctx , req )
178
188
if err != nil {
@@ -191,7 +201,7 @@ func seek(ctx context.Context, cmd *cli.Command) error {
191
201
192
202
req := & replay.SeekRequest {
193
203
PlaybackId : cmd .String ("id" ),
194
- StartTime : int64 (cmd .Int ("pts" )),
204
+ SeekOffset : int64 (cmd .Int ("pts" )),
195
205
}
196
206
_ , err = replayClient .Seek (ctx , req )
197
207
return err
0 commit comments