Skip to content

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

@mark1684

Description

@mark1684

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,
  );
}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions