-
Couldn't load subscription status.
- Fork 104
e2ee support. #48
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
e2ee support. #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great work! 🔥
A few comments. Will let @theomonnom give the final 👍
examples/e2ee_hue_recv.py
Outdated
| break | ||
|
|
||
|
|
||
| def do_e2ee_test(room: livekit.Room): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like this should be a separate file? it's not part of the example
examples/e2ee_hue_recv.py
Outdated
| room = livekit.Room() | ||
| video_stream = None | ||
| # listen to e2ee_state_changed event | ||
| @room.listens_to("e2ee_state_changed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we've used @room.on in the past, would be great to keep it consistent.
examples/e2ee_hue_recv.py
Outdated
| await room.connect(URL, TOKEN, options= livekit.RoomOptions( | ||
| auto_subscribe= True, | ||
| dynacast= True, | ||
| e2ee_options= livekit.e2ee.E2EEOptions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should remove if both are default
| # sys.path.append(import_dir) | ||
|
|
||
| import livekit | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need some docs on what this example does and how to use it with the _recv examples
alternatively, we can tell users to go to meet.livekit.io to use as the subscriber
livekit/e2ee.py
Outdated
| DEFAULT_MAGIC_BYTES = b"LK-ROCKS" | ||
| DEFAULT_RATCHET_WINDOW_SIZE = 16 | ||
|
|
||
| class EncryptionType(enum.Enum): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great to have these python classes! do these map to FFI types?
|
e2ee_wave_recv.py/e2ee_hue_recv.py in the PR is used to check that the decrypted audio/video raw data can be correctly received in e2ee mode. These two examples are not necessary. you can remove it if you want. |
Co-authored-by: David Zhao <[email protected]>
Co-authored-by: David Zhao <[email protected]>
examples:
publish hue video with e2ee
e2ee_hue.py
publish wave with e2ee
e2ee_wave.py
publish and subscribe
e2ee_wave_recv.py
e2ee_hue_recv.py