StreamCallContainer.pictureInPictureConfiguration is silently ignored when callContentWidgetBuilder is set
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- audio-video-rtc, mobile
Research direction
Start by reading StreamCallContainer._buildCallContent and the StreamCallContent implementation, where the issue says the PiP configuration is currently passed only to the default content. Trace how the iOS and Android PiP views are added to the content stack and check the relevant widget tests. Done means custom content honors the container configuration, or the unsupported combination is clearly warned about and documented.
Written by the indexing model from the issue text.
Description
Version: stream_video_flutter 1.6.0 (same code in 1.7.2)
What happens
StreamCallContainer accepts pictureInPictureConfiguration, but _buildCallContent only passes it to the default StreamCallContent:
Widget _buildCallContent() {
return widget.callContentWidgetBuilder?.call(context, call) ??
StreamCallContent(
call: call,
onBackPressed: widget.onBackPressed,
onLeaveCallTap: widget.onLeaveCallTap,
pictureInPictureConfiguration: widget.pictureInPictureConfiguration,
);
}
When an app supplies callContentWidgetBuilder, the container's PiP setting goes nowhere, so picture-in-picture is off on both iOS and Android. Nothing warns about it, and the field's doc ("Configuration for picture-in-picture mode.") doesn't say it applies only to the default content.
Why it's surprising
Enabling PiP on the container reads as a call-level setting: "this call may go into picture-in-picture". The PiP machinery doesn't depend on how the content is drawn. StreamPictureInPictureUiKitView (iOS) and StreamPictureInPictureAndroidView (Android) are placed next to the participants in StreamCallContent's stack, so the container could place them next to custom content the same way.
Steps to reproduce
- Build a call screen with:
StreamCallContainer( call: call, pictureInPictureConfiguration: const PictureInPictureConfiguration( enablePictureInPicture: true, ), callContentWidgetBuilder: (context, call) => StreamCallContent(call: call), ) - Join the call and put the app in the background.
- No PiP window appears.
Passing the same pictureInPictureConfiguration to the inner StreamCallContent makes PiP work, which confirms the container's setting is the one being dropped.
Expected
Expected
Either of these would prevent the trap:
- The container honours its PiP setting no matter what content is used, for example by adding the PiP views around the custom content.
- At minimum, a debug assert.
StreamCallContainer's constructor isconst, so the check can't go in its initializer list, but the State can run it ininitStateanddidUpdateWidget:
If an assert is too strict for existing apps, a debug-mode warning plus a doc note on the field would do.assert( widget.callContentWidgetBuilder == null || !widget.pictureInPictureConfiguration.enablePictureInPicture, 'pictureInPictureConfiguration has no effect when callContentWidgetBuilder ' 'is set. Pass it to the StreamCallContent you build instead.', );
- Dominant language
- Dart
- Stars
- 79
- Forks
- 55
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 142
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GetStream/stream-video-flutter
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
GetStream/stream-video-flutter#1652 ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
GetStream/stream-video-flutter#1621 ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
GetStream/stream-video-flutter#1615 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
GetStream/stream-video-flutter#1535 · 2 comments ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
GetStream/stream-video-flutter#1430 · 1 comment ·
Maintainers usually reply within 2 days
All issues in GetStream/stream-video-flutter
Similar issues
-
Difficulty 2/5 Half a day Newbie friendliness 66/100
rajput-hemant/calculator#214 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
leancodepl/marionette_mcp#160 ·
Maintainers usually reply within 4 days
-
claude
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
linagora/tmail-flutter#5180 ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
decentespresso/decaid#1257 ·
Maintainers usually reply within 1 day