Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmd/lk/dispatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ var (
Usage: "List all agent dispatches in a room",
Before: createDispatchClient,
Action: listAgentDispatches,
Flags: []cli.Flag{jsonFlag},
ArgsUsage: "ROOM_NAME",
},
{
Name: "get",
Usage: "Get an agent dispatch by room and ID",
Before: createDispatchClient,
Action: getAgentDispatch,
Flags: []cli.Flag{jsonFlag},
ArgsUsage: "ROOM_NAME ID",
},
{
Expand Down Expand Up @@ -73,13 +75,15 @@ var (
Name: "metadata",
Usage: "metadata to send to agent",
},
jsonFlag,
},
},
{
Name: "delete",
Usage: "Delete an agent dispatch",
Before: createDispatchClient,
Action: deleteAgentDispatch,
Flags: []cli.Flag{jsonFlag},
ArgsUsage: "ROOM_NAME ID",
},
},
Expand Down
27 changes: 13 additions & 14 deletions cmd/lk/egress.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ TYPE selects a deprecated per-type request instead:
- "track-composite" captures an audio and a video track, as ` + reflect.TypeFor[livekit.TrackCompositeEgressRequest]().Name() + `
- "web" captures any website, with a lifecycle detached from LiveKit rooms, as ` + reflect.TypeFor[livekit.WebEgressRequest]().Name() + `

See cmd/livekit-cli/examples`
See cmd/lk/examples`
)

var (
Expand Down Expand Up @@ -130,8 +130,8 @@ var (
Action: testEgressTemplate,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "base-url (e.g. https://recorder.livekit.io/#)",
Usage: "Base template `URL`",
Name: "base-url",
Usage: "Base template `URL` (e.g. https://recorder.livekit.io/#)",
Required: true,
},
&cli.StringFlag{
Expand All @@ -151,11 +151,10 @@ var (
},
},
{
Name: "update-layout",
Usage: "Updates layout for a live room composite egress",
ArgsUsage: "ID",
Before: createEgressClient,
Action: updateLayout,
Name: "update-layout",
Usage: "Updates layout for a live room composite egress",
Before: createEgressClient,
Action: updateLayout,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "id",
Expand Down Expand Up @@ -220,7 +219,7 @@ var (
Flags: []cli.Flag{
&cli.StringFlag{
Name: "request",
Usage: "WebEgressRequest as json file (see cmd/livekit-cli/examples)",
Usage: "WebEgressRequest as json file (see cmd/lk/examples)",
Required: true,
},
},
Expand All @@ -234,7 +233,7 @@ var (
Flags: []cli.Flag{
&cli.StringFlag{
Name: "request",
Usage: "ParticipantEgressRequest as json file (see cmd/livekit-cli/examples)",
Usage: "ParticipantEgressRequest as json file (see cmd/lk/examples)",
Required: true,
},
},
Expand All @@ -248,7 +247,7 @@ var (
Flags: []cli.Flag{
&cli.StringFlag{
Name: "request",
Usage: "TrackCompositeEgressRequest as json file (see cmd/livekit-cli/examples)",
Usage: "TrackCompositeEgressRequest as json file (see cmd/lk/examples)",
Required: true,
},
},
Expand All @@ -262,7 +261,7 @@ var (
Flags: []cli.Flag{
&cli.StringFlag{
Name: "request",
Usage: "TrackEgressRequest as json file (see cmd/livekit-cli/examples)",
Usage: "TrackEgressRequest as json file (see cmd/lk/examples)",
Required: true,
},
},
Expand Down Expand Up @@ -352,8 +351,8 @@ var (
Action: testEgressTemplate,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "base-url (e.g. https://recorder.livekit.io/#)",
Usage: "Base template `URL`",
Name: "base-url",
Usage: "Base template `URL` (e.g. https://recorder.livekit.io/#)",
Required: true,
},
&cli.StringFlag{
Expand Down
14 changes: 14 additions & 0 deletions cmd/lk/examples/auto-participant-egress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"preset": "H264_720P_30",
"file_outputs": [
{
"filepath": "{room_name}/{publisher_identity}-{time}.mp4",
"s3": {
"access_key": "aws-access-key",
"secret": "aws-access-secret",
"region": "aws-region",
"bucket": "my-bucket"
}
}
]
}
3 changes: 3 additions & 0 deletions cmd/lk/phone_number.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ var (
Name: "sip-dispatch-rule-id",
Usage: "SIP dispatch rule ID to apply to all purchased numbers",
},
jsonFlag,
},
},
{
Expand Down Expand Up @@ -109,6 +110,7 @@ var (
Name: "number",
Usage: "Use phone number string for lookup",
},
jsonFlag,
},
ArgsUsage: "Either --id or --number must be provided",
},
Expand All @@ -129,6 +131,7 @@ var (
Name: "sip-dispatch-rule-id",
Usage: "SIP dispatch rule ID to assign to the phone number",
},
jsonFlag,
},
ArgsUsage: "Either --id or --number must be provided",
},
Expand Down
6 changes: 3 additions & 3 deletions cmd/lk/room.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ var (
Before: createRoomClient,
Action: updateRoomMetadata,
Flags: []cli.Flag{
hidden(optional(roomFlag)),
&cli.StringFlag{
Name: "metadata",
Usage: "New room `METADATA` (required)",
Required: true,
},
},
Expand All @@ -136,7 +136,7 @@ var (
UsageText: "lk room delete [OPTIONS] ROOM_NAME",
Before: createRoomClient,
Action: deleteRoom,
ArgsUsage: "ROOM_NAME_OR_ID",
ArgsUsage: "ROOM_NAME",
},
{
Name: "join",
Expand Down Expand Up @@ -212,7 +212,7 @@ var (
Commands: []*cli.Command{
{
Name: "list",
Usage: "List or search for active rooms by name",
Usage: "List participants in a room",
Action: listParticipants,
ArgsUsage: "ROOM_NAME",
},
Expand Down
8 changes: 4 additions & 4 deletions cmd/lk/sip.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ var (
Name: "delete",
Usage: "Delete SIP Dispatch Rule",
Action: deleteSIPDispatchRule,
ArgsUsage: "SIPTrunk ID to delete",
ArgsUsage: "SIPDispatchRule ID to delete",
},
},
},
Expand Down Expand Up @@ -486,15 +486,15 @@ func appendSIPMediaFlags(flags []cli.Flag) []cli.Flag {
flags = append(flags,
&cli.StringFlag{
Name: "media-enc",
Usage: "Sets media encryption for outbound call",
Usage: "Sets media encryption for calls",
},
&cli.BoolFlag{
Name: "no-default-codecs",
Usage: "Disables a builtin list of default SIP codecs",
Usage: "Disables a builtin list of default SIP codecs, so only those in --codecs are used. Has no effect without --codecs",
},
&cli.StringSliceFlag{
Name: "codecs",
Usage: "Sets a list of SIP codecs for outbound call",
Usage: "Sets a list of SIP codecs for calls",
},
)
return flags
Expand Down
2 changes: 1 addition & 1 deletion cmd/lk/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func createToken(ctx context.Context, c *cli.Command) error {
name := c.String("name")
metadata := c.String("metadata")
validFor := c.String("valid-for")
roomPreset := c.String("room-preset")
roomPreset := c.String("room-configuration")
participantAttributes, err := parseKeyValuePairs(c, "attribute")
if err != nil {
return fmt.Errorf("failed to parse participant attributes: %w", err)
Expand Down
Loading