Skip to content

Commit 32b8b0a

Browse files
committed
fix: don't wrap video in cover mode
1 parent 38a5078 commit 32b8b0a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/src/widgets/video_track_renderer.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ class _VideoTrackRendererState extends State<VideoTrackRenderer> {
257257
Widget build(BuildContext context) {
258258
final child = kIsWeb ? _videoViewForWeb() : _videoViewForNative();
259259

260+
if (widget.fit == rtc.RTCVideoViewObjectFit.RTCVideoViewObjectFitCover) {
261+
return child;
262+
}
263+
260264
return LayoutBuilder(
261265
builder: (BuildContext context, BoxConstraints constraints) {
262266
if (!constraints.hasBoundedWidth && !constraints.hasBoundedHeight) {

0 commit comments

Comments
 (0)