-
Notifications
You must be signed in to change notification settings - Fork 209
fix: Enable E2EE for VP9 codec #953
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
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.
For reliability, please enable VP9 only in this PR since AV1 is marked as not yet supported in the JS SDK.
https://github.com/livekit/client-sdk-js/blob/main/src/e2ee/worker/FrameCryptor.ts#L669-L671
|
Thanks for the input. I have updated the PR to enable E2EE for VP9 only. Please check again. |
lib/src/e2ee/e2ee_manager.dart
Outdated
| ..on<TrackSubscribedEvent>((event) async { | ||
| final codec = event.publication.mimeType.split('/')[1]; | ||
| if (event.publication.encryptionType == EncryptionType.kNone || isSVCCodec(codec)) { | ||
| if (event.publication.encryptionType == EncryptionType.kNone) { |
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.
| if (event.publication.encryptionType == EncryptionType.kNone) { | |
| if (event.publication.encryptionType == EncryptionType.kNone || codec.toLowerCase() == 'av1') { |
lib/src/e2ee/e2ee_manager.dart
Outdated
| ..on<LocalTrackPublishedEvent>((event) async { | ||
| if (event.publication.encryptionType == EncryptionType.kNone || | ||
| isSVCCodec(event.publication.track?.codec ?? '')) { | ||
| if (event.publication.encryptionType == EncryptionType.kNone) { |
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.
| if (event.publication.encryptionType == EncryptionType.kNone) { | |
| if (event.publication.encryptionType == EncryptionType.kNone || | |
| event.publication.track?.codec?.toLowerCase() == 'av1') { |
Problem
While using the Flutter SDK with JS SDK and with E2EE enabled, the video from Web can not be decrypted by the Flutter app.
Summary
Enables end-to-end encryption (E2EE) for VP9 codec. Previously, E2EE was skipped for all SVC codecs. This aligns the Flutter SDK with the JS SDK, where E2EE works with VP9 codec.
Changes
Removed
isSVCCodec()and useisAV1Codec()to enable E2EE setup for VP9 codec inLocalTrackPublishedEventhandlerRemoved
isSVCCodec()and useisAV1Codec()to enable E2EE setup for VP9 codec inTrackSubscribedEventhandlerIs there any specific reason why E2EE is disabled for SVC codecs?
I tried VP9 with this patch and the VP9 video from Web can be decrypted by Flutter app.