You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered:
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,
)),
),
),
)
}
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:
VideoTrackRenderer
is surrounded by a widget with bright color, for example aColoredBox
The error does not happen:
VideoTrackRenderer
with a blackColoredBox
(any device)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
The text was updated successfully, but these errors were encountered: