Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video Orientation Not Working In IOS when Ios auto rotation is Locked #47

Open
mark1684 opened this issue Aug 6, 2024 · 0 comments
Open

Comments

@mark1684
Copy link

mark1684 commented Aug 6, 2024

Future fullScreenPressedIos() async {

if (_viewPlayerController != null) {
  // await _viewPlayerController.fullScreen(
  //
  // );
}

setState(() {
  _isFullScreen = !_isFullScreen;
});

if (_isFullScreen) {
  SystemChrome.setPreferredOrientations([
    DeviceOrientation.landscapeRight,
    DeviceOrientation.landscapeLeft,
  ]);
  // setState(() {
  //   _rotation =  pi ; // rotate 90 degrees
  // });
  SystemChrome.setEnabledSystemUIMode(
    SystemUiMode.manual,
    // overlays: SystemUiOverlay.bottom,
    overlays: SystemUiOverlay.values,
  );
} else {
  SystemChrome.setPreferredOrientations([
    DeviceOrientation.landscapeRight,
    DeviceOrientation.landscapeLeft,
    DeviceOrientation.portraitUp,
    DeviceOrientation.portraitDown,
  ]);
  SystemChrome.setEnabledSystemUIMode(
    SystemUiMode.manual,
    overlays: SystemUiOverlay.values,
  );
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant