10000 Web: Don't stop tracks when disposing `MediaStream` by hiroshihorie · Pull Request #760 · flutter-webrtc/flutter-webrtc · GitHub
[go: up one dir, main page]

Skip to content

Web: Don't stop tracks when disposing MediaStream #760

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

Merged
merged 2 commits into from
Nov 10, 2021

Conversation

hiroshihorie
Copy link
Member
@hiroshihorie hiroshihorie commented Nov 9, 2021

I believe the developer should be responsible of stopping tracks if required. Since tracks maybe required for later use.
This matches the behavior with iOS/Android, not calling stop on tracks when disposing MediaStream.

Additionally, RTCVideoRendererWeb shouldn't call dispose on srcObject. Any time RTCVideoRendererWeb gets disposed srcObject will get disposed.

I found that MediaStreamTrack.dispose is deprecated anyway :

@Deprecated('use stop() instead')
Future<void> dispose();

I agree stop should be called by developer whenever required.

@cloudwebrtc @davidzhao

@davidzhao
Copy link
Member

this is a good fix. well done!

@cloudwebrtc
Copy link
Member

LGTM

@cloudwebrtc cloudwebrtc merged commit 1604689 into flutter-webrtc:master Nov 10, 2021
@hiroshihorie hiroshihorie deleted the dont-stop-tracks branch November 10, 2021 16:37
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.

3 participants
0