Skip to content

Error when using "Picture in Picture". #206

Description

@HyunjoonKo

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions