flutter_vlc_player
flutter_vlc_player copied to clipboard
Not working on full screen
I can not put the player on landscape and full screen...
Also the example on the repo does not work! (the full screen)
In earlier versions ot the plugin (6.0.5 f.e.) I changed size of the Container:
return Container(
height: height,
width: width,
child: VlcPlayer(
controller: _controller,
aspectRatio: 16 / 9,
placeholder: CircularProgressIndicator(),
),
);
But right now they've broken something: after changing the size of the container, the video size does not change.
I figured out a way to display videosin landscape. The basic idea is the following setup:
final screenSize = MediaQuery.of(context).size;
final vlcPlayer = VlcPlayer(
controller: vlcController,
aspectRatio: screenSize.width / screenSize.height,
placeholder: const Center(child: CircularProgressIndicator()));
Scaffold(
body: Stack(
children: [
Container(
// Background behind the video
color: Colors.black,
),
Center(
child: AspectRatio(aspectRatio: 16 / 9, child: vlcPlayer)),
],
),
)
You can find details here in: