-
Notifications
You must be signed in to change notification settings - Fork 201
Better audio management #10
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
disposing if already published causes exception.
davidzhao
left a comment
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.
looks good! I noticed how it fixed a few of the bugs that I had ran into as well.
Only Q about audio track options.
example/ios/Runner/Info.plist
Outdated
| <key>UIBackgroundModes</key> | ||
| <array> | ||
| <string>audio</string> | ||
| <string>fetch</string> |
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.
do we need these? it seems like audio is the only mode we should have.
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.
removed! was figuring out why background audio wasnt working.
example/lib/widgets/controls.dart
Outdated
| import 'package:eva_icons_flutter/eva_icons_flutter.dart'; | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:livekit_client/livekit_client.dart'; | ||
| import 'package:livekit_client/src/track/audio_track.dart'; |
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 an unused import
| } | ||
|
|
||
| // doesn't make sense to negotiate if already disposed | ||
| if (!isDisposed) { |
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.
can this logic be encapsulated within engine.negotiate?
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.
currently engine gets disposed later ..... so I might need to restructure things...
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.
got it, this is fine then :)
| abstract class Participant extends LKChangeNotifier { | ||
| abstract class Participant extends DisposeAwareChangeNotifier { | ||
| /// map of track sid => published track | ||
| final trackPublications = <String, TrackPublication>{}; |
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.
why was this changed to a Set? IIRC, Set makes it hard to do get publication by sid. Though we don't expect the performance to be an issue.. just curious on the choice to change it.
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.
Yes I was going to revert this 😅 lookup is harder.
|
Background audio now works |
davidzhao
left a comment
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.
great stuff! are we good to merge then? oh, it'd be great to clean up some of the lines that are commented out too.
| } | ||
|
|
||
| // doesn't make sense to negotiate if already disposed | ||
| if (!isDisposed) { |
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.
got it, this is fine then :)
I'll merge today after clean ups and checks! |
Known issues
recordcategory.Fix