Skip to content

[bug] VideoTrackRenderer blows out video in light mode on Samsung #776

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
phr4fh opened this issue May 5, 2025 · 1 comment
Open

[bug] VideoTrackRenderer blows out video in light mode on Samsung #776

phr4fh opened this issue May 5, 2025 · 1 comment

Comments

@phr4fh
Copy link

phr4fh commented May 5, 2025

Hello, I noticed that on some Android (Samsung) phones, the VideoTrackRenderer renders a video almost completely blown out white when the device is in light mode, but correct when in dark mode.

To Reproduce

The error happens:

  • so far we reproduced it on Samsung S20, Samsung A14 and Samsung A41
  • AND when device is in light mode - actually when VideoTrackRenderer is surrounded by a widget with bright color, for example a ColoredBox

The error does not happen:

  • on other devices (iPhones, Web, Windows, other Androids like Samsung S10, Huawei, Xiaomi)
  • when we surround VideoTrackRenderer with a black ColoredBox (any device)
// this works, but we dont always want black background
ColoredBox(
              color: Colors.black,
              child: VideoTrackRenderer(
                callContent.videoTrack!,
                mirrorMode: VideoViewMirrorMode.auto,
                fit: RTCVideoViewObjectFit.RTCVideoViewObjectFitContain,
              ))
light mode dark mode red for testing
Image Image Image
actually against a window, you only see something if there is harsh contrast in the video, otherwise it is completly white the red shows that the renderer does something with opacity

So my guess is that it has something to do with the renderer specifically on Samsung devices. Mayba alpha channel?

Expected behavior

VideoTrackRenderer should be indifferent to background color and theme mode.

Platform information

  • Flutter version: 3.27.3
  • Plugin version: 2.3.5
  • Flutter target OS: Android, especially Samsung
  • Flutter target OS version: observed it on Android 12
@phr4fh
Copy link
Author

phr4fh commented May 14, 2025

Found a workaround for painting the background black just behind the video. But this only works, if we already know the aspect ratio of the video:

  Widget build(BuildContext context) =>
       Center( // you need to center everything
              child: AspectRatio( // by using this widget, the area around the video is not colored as well
                aspectRatio: aspectRatio, // but you need to know the aspect ratio
                child: Center( // and center it again
                  child: ColoredBox( // then paint the background black
                      color: Colors.black,
                      child: VideoTrackRenderer(
                        callContent.videoTrack!,
                        mirrorMode: VideoViewMirrorMode.auto,
                        fit: RTCVideoViewObjectFit.RTCVideoViewObjectFitContain,
                      )),
                ),
              ),
            )
}

So the initial issue remains.

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

No branches or pull requests

1 participant