Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
8 changes: 8 additions & 0 deletions livekit-api/src/services/egress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ impl EgressClient {
image_outputs,
output: None, // Deprecated
await_start_signal: options.await_start_signal,
// TODO implement webhooks
webhooks: Default::default(),
},
self.base
.auth_header(VideoGrants { room_record: true, ..Default::default() }, None)?,
Expand Down Expand Up @@ -184,6 +186,8 @@ impl EgressClient {
stream_outputs,
segment_outputs,
image_outputs,
// TODO implement webhooks
webhooks: Default::default(),
},
self.base
.auth_header(VideoGrants { room_record: true, ..Default::default() }, None)?,
Expand Down Expand Up @@ -215,6 +219,8 @@ impl EgressClient {
segment_outputs,
image_outputs,
output: None, // Deprecated
// TODO implement webhooks
webhooks: Default::default(),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason why we have to do this everytime is because we're using the wrong syntax

Suggested change
// TODO implement webhooks
webhooks: Default::default(),
..Default::default(),

},
self.base
.auth_header(VideoGrants { room_record: true, ..Default::default() }, None)?,
Expand Down Expand Up @@ -244,6 +250,8 @@ impl EgressClient {
}
},
track_id: track_id.to_string(),
// TODO implement webhooks
webhooks: Default::default(),
},
self.base
.auth_header(VideoGrants { room_record: true, ..Default::default() }, None)?,
Expand Down
3 changes: 3 additions & 0 deletions livekit-api/src/services/sip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@ impl SIPClient {
// TODO: support these attributes
room_preset: Default::default(),
room_config: Default::default(),

// TODO implement dispatch_rule
dispatch_rule: Default::default(),
},
self.base.auth_header(
Default::default(),
Expand Down
1 change: 1 addition & 0 deletions livekit-ffi/protocol/participant.proto
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,5 @@ enum DisconnectReason {
USER_REJECTED = 12;
// SIP protocol failure or unexpected response
SIP_TRUNK_FAILURE = 13;
CONNECTION_TIMEOUT = 14;
}
1 change: 1 addition & 0 deletions livekit-ffi/src/conversion/participant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ impl From<DisconnectReason> for proto::DisconnectReason {
DisconnectReason::UserUnavailable => proto::DisconnectReason::UserUnavailable,
DisconnectReason::UserRejected => proto::DisconnectReason::UserRejected,
DisconnectReason::SipTrunkFailure => proto::DisconnectReason::SipTrunkFailure,
DisconnectReason::ConnectionTimeout => proto::DisconnectReason::ConnectionTimeout,
}
}
}
1 change: 1 addition & 0 deletions livekit-ffi/src/conversion/room.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ impl From<DisconnectReason> for proto::DisconnectReason {
DisconnectReason::UserUnavailable => Self::UserUnavailable,
DisconnectReason::UserRejected => Self::UserRejected,
DisconnectReason::SipTrunkFailure => Self::SipTrunkFailure,
DisconnectReason::ConnectionTimeout => Self::ConnectionTimeout,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you create a similar conversion for the TrackFeature?
impl From< AudioTrackFeature > for proto:: AudioTrackFeature {

We're currently only relying on the integer, which is unsafe and will panic as soon as the proto adds a new one

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theomonnom I added conversions in both directions and added AudioTrackFeature to the rtc prelude

}
}
}
Expand Down
3 changes: 3 additions & 0 deletions livekit-ffi/src/livekit.proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,7 @@ pub enum DisconnectReason {
UserRejected = 12,
/// SIP protocol failure or unexpected response
SipTrunkFailure = 13,
ConnectionTimeout = 14,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we simply add this without breaking users' code?

}
impl DisconnectReason {
/// String value of the enum field names used in the ProtoBuf definition.
Expand All @@ -1716,6 +1717,7 @@ impl DisconnectReason {
DisconnectReason::UserUnavailable => "USER_UNAVAILABLE",
DisconnectReason::UserRejected => "USER_REJECTED",
DisconnectReason::SipTrunkFailure => "SIP_TRUNK_FAILURE",
DisconnectReason::ConnectionTimeout => "CONNECTION_TIMEOUT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand All @@ -1735,6 +1737,7 @@ impl DisconnectReason {
"USER_UNAVAILABLE" => Some(Self::UserUnavailable),
"USER_REJECTED" => Some(Self::UserRejected),
"SIP_TRUNK_FAILURE" => Some(Self::SipTrunkFailure),
"CONNECTION_TIMEOUT" => Some(Self::ConnectionTimeout),
_ => None,
}
}
Expand Down
2 changes: 1 addition & 1 deletion livekit-protocol/protocol
Submodule protocol updated 95 files
+0 −5 .changeset/chilly-years-obey.md
+0 −5 .changeset/red-dogs-love.md
+0 −6 .changeset/sip-dispatch-info.md
+0 −6 .changeset/sip-domain-attr.md
+0 −5 .changeset/sip-num-norm.md
+0 −6 .changeset/wet-comics-cross.md
+74 −0 CHANGELOG.md
+1 −1 agent/token.go
+5 −0 auth/accesstoken.go
+4 −4 auth/accesstoken_test.go
+33 −0 auth/grants.go
+3 −3 auth/verifier_test.go
+61 −0 egress/notify_options.go
+1 −1 egress/token.go
+31 −59 infra/link.pb.go
+6 −3 ingress/token.go
+4 −0 livekit/attrs.go
+118 −210 livekit/livekit_agent.pb.go
+40 −75 livekit/livekit_agent_dispatch.pb.go
+261 −510 livekit/livekit_analytics.pb.go
+1,824 −0 livekit/livekit_cloud_agent.pb.go
+3,103 −0 livekit/livekit_cloud_agent.twirp.go
+511 −800 livekit/livekit_egress.pb.go
+203 −199 livekit/livekit_egress.twirp.go
+156 −291 livekit/livekit_ingress.pb.go
+512 −354 livekit/livekit_internal.pb.go
+56 −137 livekit/livekit_metrics.pb.go
+1,012 −1,130 livekit/livekit_models.pb.go
+259 −277 livekit/livekit_room.pb.go
+371 −86 livekit/livekit_room.twirp.go
+350 −636 livekit/livekit_rtc.pb.go
+1,323 −1,070 livekit/livekit_sip.pb.go
+1,218 −351 livekit/livekit_sip.twirp.go
+21 −39 livekit/livekit_webhook.pb.go
+308 −1 livekit/sip.go
+135 −0 livekit/sip_test.go
+55 −0 livekit/types.go
+12 −0 logger/logger.go
+11 −25 logger/logger_test.go
+4 −44 logger/medialogutils/cmd.go
+23 −0 logger/testutil/testutil.go
+17 −17 logger/zaputil/deferrer.go
+52 −12 logger/zaputil/deferrer_test.go
+1 −0 magefile.go
+1 −1 package.json
+76 −0 packages/javascript/CHANGELOG.md
+1 −1 packages/javascript/package.json
+190 −0 protobufs/livekit_cloud_agent.proto
+22 −0 protobufs/livekit_egress.proto
+58 −19 protobufs/livekit_internal.proto
+30 −7 protobufs/livekit_models.proto
+17 −0 protobufs/livekit_room.proto
+4 −2 protobufs/livekit_rtc.proto
+73 −10 protobufs/livekit_sip.proto
+1 −1 protobufs/livekit_webhook.proto
+10 −0 protobufs/rpc/participant.proto
+3 −0 protobufs/rpc/sip.proto
+4 −15 psrpc/errors.go
+1 −1 replay/cloud_replay.pb.go
+30 −68 rpc/agent.pb.go
+11 −32 rpc/agent_dispatch.pb.go
+8 −27 rpc/analytics.pb.go
+29 −71 rpc/egress.pb.go
+51 −113 rpc/ingress.pb.go
+136 −298 rpc/io.pb.go
+9 −17 rpc/keepalive.pb.go
+29 −54 rpc/participant.pb.go
+42 −20 rpc/participant.psrpc.go
+12 −29 rpc/room.pb.go
+8 −18 rpc/roommanager.pb.go
+85 −0 rpc/rpcfakes/fake_typed_participant_client.go
+16 −36 rpc/signal.pb.go
+5 −4 rpc/sip.go
+87 −178 rpc/sip.pb.go
+62 −62 rpc/sip.psrpc.go
+577 −13 sdp/sdp.go
+185 −0 sdp/sdp_test.go
+33 −0 sip/sip.go
+7 −0 utils/error.go
+21 −17 utils/guid/id.go
+10 −0 utils/hwstats/cpu.go
+1 −0 utils/hwstats/cpu_null.go
+41 −0 utils/hwstats/memory.go
+33 −0 utils/hwstats/memory_all.go
+160 −0 utils/hwstats/memory_linux.go
+21 −0 utils/hwstats/memory_nonlinux.go
+21 −17 utils/id.go
+35 −6 utils/promise.go
+42 −0 utils/promise_test.go
+45 −0 webhook/filter.go
+270 −14 webhook/notifier.go
+121 −0 webhook/resource_queue.go
+368 −0 webhook/resource_url_notifier.go
+80 −172 webhook/url_notifier.go
+648 −15 webhook/webhook_test.go
Loading
Loading