flutter_vlc_player icon indicating copy to clipboard operation
flutter_vlc_player copied to clipboard

Not working on full screen

Open lgozalvez opened this issue 2 years ago • 2 comments

I can not put the player on landscape and full screen...

Also the example on the repo does not work! (the full screen)

lgozalvez avatar May 03 '22 16:05 lgozalvez

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.

kostov avatar Jun 20 '22 09:06 kostov

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:

jraufeisen avatar Aug 21 '22 20:08 jraufeisen