Skip to content

Commit

Permalink
fixed video player issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Erarshad committed Jul 6, 2021
1 parent b6aa20a commit 81696d9
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 1 deletion.
Binary file modified android/.gradle/6.7/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified android/.gradle/6.7/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified android/.gradle/6.7/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified android/.gradle/6.7/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified android/.gradle/6.7/javaCompile/javaCompile.lock
Binary file not shown.
Binary file modified android/.gradle/6.7/javaCompile/taskHistory.bin
Binary file not shown.
Binary file modified android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified android/.gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
17 changes: 16 additions & 1 deletion lib/sftp_streaming/video_dir.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,28 @@ class _media_streamState extends State<media_stream> {
final Map<String, dynamic> headers;
_media_streamState({this.selected_file, this.file_name,this.headers});
BetterPlayerListVideoPlayerController controller;

List<DeviceOrientation> orientations=[DeviceOrientation.portraitUp];
void initState() {
super.initState();
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,

]);
controller = BetterPlayerListVideoPlayerController();
Future.delayed(Duration(seconds: 1), () {
controller.play();
});
}
@override
dispose(){
SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeRight,
DeviceOrientation.landscapeLeft,
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
super.dispose();
}

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -64,6 +78,7 @@ class _media_streamState extends State<media_stream> {

configuration: BetterPlayerConfiguration(
autoPlay: false,
deviceOrientationsAfterFullScreen: orientations


),
Expand Down

0 comments on commit 81696d9

Please sign in to comment.