There is some green sidebar in some of the video in video_player flutter. It works fine in mobile but green bar appears when played on android tv.
My code sample
class VideoWidget extends StatelessWidget {
const VideoWidget({Key? key, required this.controller}) : super(key: key);
final VideoPlayerController controller;
@override
Widget build(BuildContext context) {
return Container(alignment: Alignment.topCenter, child: buildVideo());
}
Widget buildVideo() => Stack(
fit: StackFit.expand,
children: <Widget>[
buildVideoPlayer(),
],
);
Widget buildVideoPlayer() => buildFullScreen(
child: AspectRatio(
aspectRatio: controller.value.aspectRatio,
child: VideoPlayer(controller),
),
);
Widget buildFullScreen({
required Widget child,
}) {
final size = controller.value.size;
final width = size.width;
final height = size.height;
return FittedBox(
fit: BoxFit.fill,
child: SizedBox(width: width,height: height, child: child),
);
}
}
Flutter version: 3.0.2 , Video Player version:2.4.5 , Android version: 11.1 , Android box model: MBOX