Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: keep events order #60

Merged
merged 15 commits into from
Sep 13, 2023
Merged

fix: keep events order #60

merged 15 commits into from
Sep 13, 2023

Conversation

theomonnom
Copy link
Member

@theomonnom theomonnom commented Sep 12, 2023

  • Always ensure we keep the order from the FfiServer
    • So the complex logic can be handled from Rust (for synchronisation)
    • E.g: the ffi server ensure that the LocalTrackPublished callback is sent before the LocalTrackPublished event
  • We know use only one FfiQueue per room (So it is possible for us to keep things synchronised)

The room musts be used inside one event_loop (specified inside the ctor)
AudioStream & VideoStream can be used on other event_loops (making it easy to have another IO thread for e.g)

livekit/_utils.py Outdated Show resolved Hide resolved
@theomonnom
Copy link
Member Author

it's tricky, now with the changes, we can't publish tracks before running room.run() ...

Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

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

lgtm!

examples/basic_room.py Show resolved Hide resolved
@@ -64,6 +70,7 @@ def name(self) -> str:
def metadata(self) -> str:
return self._info.metadata

@property
def e2ee_manager(self) -> E2EEManager:
Copy link
Member

Choose a reason for hiding this comment

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

would this change the interface? let's document in changelog

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

@theomonnom theomonnom merged commit c8f35c3 into main Sep 13, 2023
@theomonnom theomonnom deleted the theo/maintain-order branch September 13, 2023 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants