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

Error when using "Picture in Picture". #206

Open
HyunjoonKo opened this issue Apr 9, 2021 · 0 comments
Open

Error when using "Picture in Picture". #206

HyunjoonKo opened this issue Apr 9, 2021 · 0 comments

Comments

@HyunjoonKo
Copy link

Environment: Xcode 12.4 (12D4e)
Language: Swift 5.3.2
Toaster version used: 2.3.0

When using the "Picture in Picture" function on iOS 14 or higher devices, the toast view is not in the normal position.

Error reproduction path:

  1. Launch the video player(AVPlayer) and activate the PIP mode.
  2. Change the device orientation to landscape mode.
  3. Change the orientation back to portrait.
  • An error occurred.

When an error occurs, the toast is output in a strange position, regardless of the device's orientation portrait/landscape.

IMG_16BC596BD6AD-1

Looking at the code, let containerSize = ToastWindow.shared.frame.size in ToastView's layoutSubviews() is wrong. Originally it should be the device screen size, but it seems to be returned as the size of AVLayer of AVPictureInPictureController.

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