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
7 changes: 6 additions & 1 deletion livekit-ffi/protocol/room.proto
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ message RoomEvent {
ParticipantMetadataChanged participant_metadata_changed = 17;
ParticipantNameChanged participant_name_changed = 18;
ParticipantAttributesChanged participant_attributes_changed = 19;
ParticipantEncryptionStatusChanged participant_encryption_status_changed = 39;
ConnectionQualityChanged connection_quality_changed = 20;
ConnectionStateChanged connection_state_changed = 21;
// Connected connected = 21;
Expand All @@ -385,6 +384,8 @@ message RoomEvent {
RoomInfo moved = 37;
// carry over all participant info updates, including sid
ParticipantsUpdated participants_updated = 38;
ParticipantEncryptionStatusChanged participant_encryption_status_changed = 39;
TokenRefreshed token_refreshed = 40;
}
}

Expand Down Expand Up @@ -561,6 +562,10 @@ message Disconnected {
message Reconnecting {}
message Reconnected {}

message TokenRefreshed {
required string token = 1;
}

message RoomEOS {}

message DataStream {
Expand Down
3 changes: 3 additions & 0 deletions livekit-ffi/src/server/room.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,9 @@ async fn forward_event(
.into(),
);
}
RoomEvent::TokenRefreshed { token } => {
let _ = send_event(proto::TokenRefreshed { token: token.into() }.into());
}
_ => {
log::warn!("unhandled room event: {:?}", event);
}
Expand Down
5 changes: 5 additions & 0 deletions livekit/src/room/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ pub enum RoomEvent {
ParticipantsUpdated {
participants: Vec<Participant>,
},
TokenRefreshed {
token: String,
},
}

#[derive(Debug, Clone, Copy, Eq, PartialEq)]
Expand Down Expand Up @@ -1741,6 +1744,8 @@ impl RoomSession {
for filter in registered_audio_filter_plugins().into_iter() {
filter.update_token(url.clone(), token.clone());
}
let event = RoomEvent::TokenRefreshed { token };
self.dispatcher.dispatch(&event);
}
}

Expand Down