Skip to content

Always create a new track on web #954

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

renefloor
Copy link
Contributor

🎯 Goal

Fix screen sharing on web.
Fixes FLU-124

🛠 Implementation details

When starting to share your screen on web the _setTrackEnabled is called, but the deviceId is always null for the requirements. Therefore compareScreenShareMode is always true, even though we should create a new track.

The callback is then set to the wrong track, the old one: https://github.com/GetStream/stream-video-flutter/blob/main/packages/stream_video/lib/src/call/call.dart#L2428-L2430

Debugging showed that on the actual track the onEnded callback was null: https://github.com/flutter-webrtc/dart-webrtc/blob/main/lib/src/media_stream_track_impl.dart#L16

🧪 Testing

Test by running on web and start screen sharing only tabs and stop them using the browser tools.

☑️Contributor Checklist

General

  • Assigned a person / code owner group (required)
  • Thread with the PR link started in a respective Slack channel (#flutter-team) (required)
  • PR is linked to the GitHub issue it resolves

☑️Reviewer Checklist

  • Sample runs & works
  • UI Changes correct (before & after images)
  • Bugs validated (bugfixes)
  • New feature tested and works
  • All code we touched has new or updated Documentation

@renefloor renefloor requested a review from a team as a code owner May 13, 2025 12:14
@renefloor renefloor requested a review from Brazol May 13, 2025 12:16
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.

2 participants