-
Notifications
You must be signed in to change notification settings - Fork 29.2k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.0Found to occur in 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1Found to occur in 3.1p: video_playerThe Video Player pluginThe Video Player pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Certain videos can be rendered with a green bar on the right or bottom edge on certain Android devices. This never happens on iOS devices. I can repro this 100% on a Nexus 9.
The following code leads to the problem:
import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';
class VideoBarsHomePage extends StatefulWidget {
@override
_VideoBarsHomePageState createState() => _VideoBarsHomePageState();
}
class _VideoBarsHomePageState extends State<VideoBarsHomePage> {
VideoPlayerController _videoPlayerController;
@override
void initState() {
super.initState();
_videoPlayerController = VideoPlayerController.asset("videos/beam_white.mp4");
_videoPlayerController.setLooping(true);
_videoPlayerController.play();
_videoPlayerController.initialize();
}
@override
void dispose() {
_videoPlayerController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Material(
type: MaterialType.transparency,
elevation: 0,
child: Align(
// align the card to the bottom
alignment: Alignment.bottomCenter,
child: Container(
decoration: BoxDecoration(
color: Colors.grey,
borderRadius: BorderRadius.circular(16.0),
),
height: 528.0,
width: 416.0,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
//child: VideoPlayer(_videoPlayerController)
/*child: Center(
child: AspectRatio(
aspectRatio: 1080.0 / 400.0,
child: Container(
width: 1080,
height: 400,
child: VideoPlayer(_videoPlayerController)
)
),
)*/
child: FittedBox(
fit: BoxFit.contain,
child: Container(
width: 1080,
height: 400,
child: VideoPlayer(_videoPlayerController)
)
)
),
],
),
)
)
);
}
}
nickkjordan, flopshot, macoshita, otopba, luckmlc and 22 moreTom3652 and bridfishTom3652Tom3652, yelkamel and klartraum-medien
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.0Found to occur in 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1Found to occur in 3.1p: video_playerThe Video Player pluginThe Video Player pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version