File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,7 +178,11 @@ class LIVEKIT_API Room {
178178 RemoteParticipant* remoteParticipant (const std::string& identity) const ;
179179
180180 // / Returns a snapshot of all current remote participants.
181- std::vector<std::shared_ptr<RemoteParticipant>> remoteParticipants () const ;
181+ // /
182+ // / @return Vector of non-null pointers to the current remote participants.
183+ // / The pointers are owned by the Room and remain valid until the
184+ // / corresponding participant disconnects.
185+ std::vector<RemoteParticipant*> remoteParticipants () const ;
182186
183187 // / Returns the current connection state of the room.
184188 ConnectionState connectionState () const ;
Original file line number Diff line number Diff line change @@ -310,12 +310,12 @@ RemoteParticipant* Room::remoteParticipant(const std::string& identity) const {
310310 return it == remote_participants_.end () ? nullptr : it->second .get ();
311311}
312312
313- std::vector<std::shared_ptr< RemoteParticipant> > Room::remoteParticipants () const {
313+ std::vector<RemoteParticipant* > Room::remoteParticipants () const {
314314 const std::scoped_lock<std::mutex> guard (lock_);
315- std::vector<std::shared_ptr< RemoteParticipant> > out;
315+ std::vector<RemoteParticipant* > out;
316316 out.reserve (remote_participants_.size ());
317317 for (const auto & kv : remote_participants_) {
318- out.push_back (kv.second );
318+ out.push_back (kv.second . get () );
319319 }
320320 return out;
321321}
You can’t perform that action at this time.
0 commit comments