-
Notifications
You must be signed in to change notification settings - Fork 60
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
Bug Report: producer.replaceTrack() doesn't work. #62
Comments
LOL. Sorry for that. |
LOL. Sorry for that.
Im working on major update. For now, implement it with closing producer and
creating new.
вт, 30 авг. 2022 г., 19:22 un-hongly ***@***.***>:
… I'm working on a feature where user can switch their camera. To do that I
replace a new track for the producer using producer.replaceTrack(newTrack)
but it always returns a log that says "replaceTrack() | same track,
ignored." even when I pass a completely new track.
I looked into your code inside producer.dart file at line 357 you compare
a track parameter to the track parameter itself (see below) which is why
the condition is always matched.
Future<void> replaceTrack(MediaStreamTrack track) async {
...
if (track == track) {
_logger.debug('replaceTrack() | same track, ignored.');
return;
}
...
}
—
Reply to this email directly, view it on GitHub
<#62>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIVXEO7OULNBCAAXEFTFS2LV3YYKZANCNFSM6AAAAAAQASFCLU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Two years since then function "replaceTrack" is yet unable to work. |
By looking at producer.dart, I foud something weird :)
why not using:
or, rename the class property with '_' prefix, then
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm working on a feature where user can switch their camera. To do that I replace a new track for the producer using
producer.replaceTrack(newTrack)
but it always returns a log that says "replaceTrack() | same track, ignored.
" even when I pass a completely new track.I looked into your code inside producer.dart file at line 357 you compare a
track
parameter to thetrack
parameter itself (see below) which is why the condition is always matched.The text was updated successfully, but these errors were encountered: