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

Landscape camera preview not working (android) #6

Open
colin-hanbury opened this issue Nov 16, 2023 · 0 comments
Open

Landscape camera preview not working (android) #6

colin-hanbury opened this issue Nov 16, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@colin-hanbury
Copy link

rtmp_broadcaster plugin needs to be realigned with camera plugin ^0.10.5+5 to fix landscape camera preview

Currently CameraPreview is not working in this plugin. The preview height versus width check is always returning false and therefore keeps the portrait camera :

if (controller.value.previewSize!.width <
          controller.value.previewSize!.height) {
  return RotatedBox(
      quarterTurns: controller.value.previewQuarterTurns!,
      child: childView);
} else {
  return childView;
}

I ran the example app in the camera plugin and turned my phone (pixel 7 pro) sideways to landscape and saw the following:

Screenshot_20231116-135652 1

I ran the example app in the rtmp_broadcast plugin and turned my phone (pixel 7 pro) sideways to landscape and saw the following:

Screenshot_20231116-140102 1

Version 0.10.5+5 of the camera plugin was released 24 days after rtmp_broadcast's (2.2.4). I believe a fix for the camera landscape issue was released in v 0.10.5+5 and that these changes need to be replicated in the rtmp_broadcast plugin to fix the issue.

The 0.10.5+5 changelog even mentions bug fixes to the "_deviceOrientationSubscription "
https://pub.dev/packages/camera/changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants