flick-video-player icon indicating copy to clipboard operation
flick-video-player copied to clipboard

when i open video in full screen i cant close full screen, after that

Open boris-ilic opened this issue 3 years ago • 16 comments

versions:
flick_video_player: ^0.1.1 video_player: ^0.10.12+5

first i cant update packages more than this versions,

Proble is when i press little icon in down right corner it open video in full screen, when i press again to close screen, full screen stay open, only icon change and i cand do anything only change videos.

Thanks

boris-ilic avatar Jul 01 '21 12:07 boris-ilic

Any Information?

boris-ilic avatar Jul 12 '21 08:07 boris-ilic

any updates ?

AhmedAbogameel avatar Jul 14 '21 14:07 AhmedAbogameel

Can you please share a video to reproduce?

geekruchika avatar Jul 16 '21 13:07 geekruchika

Hi, here is video which represent error with error log, i debug whole package and everything seems ok, if you find solution it will help me a lot. https://we.tl/t-aCohgNeIGz

boris-ilic avatar Jul 16 '21 14:07 boris-ilic

@boris-ilic Please attach a code snippet too. Seems to be an implementation problem.

geekruchika avatar Jul 19 '21 07:07 geekruchika

Thanks for helping! video represent player and error https://we.tl/t-lVbckcdCmA

Container player(BuildContext context) { return Container( width: MediaQuery.of(context).size.width, child: currentUnit.videoPath != null || currentUnit.audioPath != null ? Container( child: VisibilityDetector( key: ObjectKey(flickManager), onVisibilityChanged: (visibility) { if (visibility.visibleFraction == 0 && this.mounted) { flickManager.flickControlManager.autoPause(); } else if (visibility.visibleFraction == 1) { flickManager.flickControlManager.autoResume(); } }, child: Column( children: <Widget>[ Container( height: 200, child: FlickVideoPlayer( flickManager: flickManager, wakelockEnabled: true, preferredDeviceOrientationFullscreen: [ DeviceOrientation.portraitUp, ], preferredDeviceOrientation: [ DeviceOrientation.portraitUp, ], flickVideoWithControls: FlickVideoWithControls( controls: Stack( children: <Widget>[ Positioned.fill( child: FlickAutoHideChild( child: Container(color: Colors.black38), ), ), Positioned.fill( child: FlickShowControlsAction( child: FlickSeekVideoAction( child: Center( child: flickVideoManager.nextVideoAutoPlayTimer != null ? FlickAutoPlayCircularProgress( colors: FlickAutoPlayTimerProgressColors( backgroundColor: Colors.white30, color: Colors.red, ), ) : FlickAutoHideChild( child: Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Padding( padding: const EdgeInsets.all(8.0), child: GestureDetector( onTap: () { skipToPreviousVideo(context); }, child: Icon( Icons.skip_previous, color: hasPreviousVideo() ? Colors.white : Colors.white38, size: 35, ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlickPlayToggle(size: 50), ), Padding( padding: const EdgeInsets.all(8.0), child: GestureDetector( onTap: () { skipToNextVideo( Duration(seconds: 5), context); }, child: Icon( Icons.skip_next, color: hasNextVideo() ? Colors.white : Colors.white38, size: 35, ), ), ) ], ), ), ), ), ), ), Positioned.fill( child: FlickAutoHideChild( child: Padding( padding: const EdgeInsets.all(8.0), child: Column( mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[ Row( children: <Widget>[ Row( children: <Widget>[ FlickCurrentPosition( fontSize: widget.fontSize, ), Text( ' / ', style: TextStyle( color: Colors.white, fontSize: widget.fontSize), ), FlickTotalDuration( fontSize: widget.fontSize, ), ], ), Expanded( child: Container(), ), FlickFullScreenToggle( size: widget.iconSize, ), ], ), // FlickVideoProgressBar( // flickProgressBarSettings: FlickProgressBarSettings( // height: 5, // handleRadius: 5, // curveRadius: 50, // backgroundColor: Colors.white24, // bufferedColor: Colors.white38, // playedColor: Colors.red, // handleColor: Colors.red, // ), // ), ], ), ), ), ), ], ), ), flickVideoWithControlsFullscreen: FlickVideoWithControls( videoFit: BoxFit.fitWidth, controls: Stack( children: <Widget>[ Positioned.fill( child: FlickAutoHideChild( child: Container(color: Colors.black38), ), ), Positioned.fill( child: FlickShowControlsAction( child: FlickSeekVideoAction( child: Center( child: flickVideoManager.nextVideoAutoPlayTimer != null ? FlickAutoPlayCircularProgress( colors: FlickAutoPlayTimerProgressColors( backgroundColor: Colors.white30, color: Colors.red, ), ) : FlickAutoHideChild( child: Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Padding( padding: const EdgeInsets.all(8.0), child: GestureDetector( onTap: () { skipToPreviousVideo(context); }, child: Icon( Icons.skip_previous, color: hasPreviousVideo() ? Colors.white : Colors.white38, size: 35, ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlickPlayToggle(size: 50), ), Padding( padding: const EdgeInsets.all(8.0), child: GestureDetector( onTap: () { skipToNextVideo( Duration(seconds: 5), context); }, child: Icon( Icons.skip_next, color: hasNextVideo() ? Colors.white : Colors.white38, size: 35, ), ), ) ], ), ), ), ), ), ), Positioned.fill( child: FlickAutoHideChild( child: Padding( padding: const EdgeInsets.all(8.0), child: Column( mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[ Row( children: <Widget>[ Row( children: <Widget>[ FlickCurrentPosition( fontSize: widget.fontSize, ), Text( ' / ', style: TextStyle( color: Colors.white, fontSize: widget.fontSize), ), FlickTotalDuration( fontSize: widget.fontSize, ), ], ), Expanded( child: Container(), ), FlickFullScreenToggle( size: widget.iconSize, ), ], ), FlickVideoProgressBar( flickProgressBarSettings: FlickProgressBarSettings( height: 5, handleRadius: 5, curveRadius: 50, backgroundColor: Colors.white24, bufferedColor: Colors.white38, playedColor: Colors.red, handleColor: Colors.red, ), ), ], ), ), ), ), ], ), ), ), ), ], ), ), ) : Container(), ); }

boris-ilic avatar Jul 23 '21 07:07 boris-ilic

any updates ?

boris-ilic avatar Jul 27 '21 19:07 boris-ilic

Try latest release. 0.4.0-dev.2

geekruchika avatar Jul 29 '21 12:07 geekruchika

Try latest release. 0.4.0-dev.2

Didnt work. Any updates?

MilanObrenovic avatar Aug 09 '21 09:08 MilanObrenovic

I found a solution. The controls need to be wrapped in a SafeArea widget or any other widget where you can add padding to it:

FlickVideoPlayer(
  flickManager: _flickManager,
  flickVideoWithControlsFullscreen: FlickVideoWithControls(
    videoFit: BoxFit.fill,
    controls: SafeArea(
      child: FlickPortraitControls(),
    ),
  ),
);

MilanObrenovic avatar Aug 09 '21 10:08 MilanObrenovic

I found a solution. The controls need to be wrapped in a SafeArea widget or any other widget where you can add padding to it:

FlickVideoPlayer(
  flickManager: _flickManager,
  flickVideoWithControlsFullscreen: FlickVideoWithControls(
    videoFit: BoxFit.fill,
    controls: SafeArea(
      child: FlickPortraitControls(),
    ),
  ),
);

Yeah, it is working fine on web but does not exit fullscreen on mobile web.

chetan-cueclad avatar Aug 10 '21 14:08 chetan-cueclad

This behaviour can be reproduced when your video is landscape and in fullscreen app rotates with the video. In this case video player under layer with full screen video also rotates and disposes, because Flutter rebuild all widgets on rotate.

NaikSoftware avatar Oct 21 '21 15:10 NaikSoftware

I'm getting this too, I do not have landscape mode for app but when I go fullscreen it rotates and then gets stuck

LucaJeevanjee avatar Mar 04 '22 17:03 LucaJeevanjee

@boris-ilic Can you use flick_video_player 0.5.0 and reproduce this issue ? I tried running flick_video_player example but could not reproduce this issue.

Are you able to reproduce this issue with flick_video_player example if not can you create a repo with minimal code to reproduce the issue ?

knowsach avatar Sep 13 '22 19:09 knowsach

any updates ?

Sherikan avatar Jan 27 '23 17:01 Sherikan

I was able to solve by calling Scrollable.ensureVisible(context) in the toggleFullScreen argument in FlickFullScreenToggle

FlickFullScreenToggle(
  size: iconSize,
  toggleFullscreen: () {
    Scrollable.ensureVisible(context);
    manager.flickControlManager?.toggleFullscreen();
  },
),

It's sloppy, but it puts the video widget at a place in the viewport that is unlikely to be disposed on rotation