|
|
@@ -1,3 +1,5 @@
|
|
|
+import 'dart:io';
|
|
|
+
|
|
|
import 'package:auto_orientation/auto_orientation.dart';
|
|
|
import 'package:chewie/chewie.dart';
|
|
|
import 'package:chewie/src/chewie_player.dart';
|
|
|
@@ -204,11 +206,15 @@ class VideoScaffold extends StatefulWidget {
|
|
|
class _VideoScaffoldState extends State<VideoScaffold> {
|
|
|
@override
|
|
|
void initState() {
|
|
|
- SystemChrome.setPreferredOrientations([
|
|
|
- DeviceOrientation.landscapeRight,
|
|
|
- DeviceOrientation.landscapeLeft,
|
|
|
- ]);
|
|
|
- AutoOrientation.landscapeMode();
|
|
|
+ if(Platform.isIOS){
|
|
|
+ AutoOrientation.landscapeLeftMode();
|
|
|
+
|
|
|
+ }else{
|
|
|
+ SystemChrome.setPreferredOrientations([
|
|
|
+ DeviceOrientation.landscapeRight,
|
|
|
+ DeviceOrientation.landscapeLeft,
|
|
|
+ ]);
|
|
|
+ }
|
|
|
super.initState();
|
|
|
}
|
|
|
|
|
|
@@ -218,7 +224,7 @@ class _VideoScaffoldState extends State<VideoScaffold> {
|
|
|
DeviceOrientation.portraitUp,
|
|
|
DeviceOrientation.portraitDown,
|
|
|
]);
|
|
|
- AutoOrientation.portraitMode();
|
|
|
+ AutoOrientation.portraitUpMode();
|
|
|
super.dispose();
|
|
|
}
|
|
|
|