flick-video-player
flick-video-player copied to clipboard
when i open video in full screen i cant close full screen, after that
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
Any Information?
any updates ?
Can you please share a video to reproduce?
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 Please attach a code snippet too. Seems to be an implementation problem.
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(), ); }
any updates ?
Try latest release. 0.4.0-dev.2
Try latest release. 0.4.0-dev.2
Didnt work. Any updates?
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(),
),
),
);
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.
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.
I'm getting this too, I do not have landscape mode for app but when I go fullscreen it rotates and then gets stuck
@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 ?
any updates ?
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