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

WWDCKeynote app starts out blank on iPad portrait #3

Closed
jackpal opened this issue Oct 17, 2021 · 3 comments
Closed

WWDCKeynote app starts out blank on iPad portrait #3

jackpal opened this issue Oct 17, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@jackpal
Copy link

jackpal commented Oct 17, 2021

YouTubePlayerKit Environment

  • YouTubePlayerKit version: 1.1.1
  • macOS version: 12.0 beta
  • iOS version: 15.0.2
  • Xcode version: 13.0
  • Dependency manager (SPM, Manually): SPM

What did you do?

  1. Built and ran the WWDCKeynote example on an iPad Mini 6th gen.
  2. Started app while the iPad is in portrait mode
  3. Tapped on the "< WWDC Keynote" navigation link

What did you expect to happen?

Expected to see the WWDC videos

What happened instead?

Heard audio, but the video and most video thumbnailss were blank.

iPad-portrait

@SvenTiigi SvenTiigi added the bug Something isn't working label Oct 17, 2021
@SvenTiigi
Copy link
Owner

SvenTiigi commented Oct 17, 2021

Hi @jackpal,

Thanks for your detailed bug report.

After some debugging on my side it seems like some "behind the scenes" SwiftUI rendering process stops the WKWebView rendering runtime 🤔

But as of for now I couldn't find any exact reason.
The YouTube iFrame API is correctly loaded and the JavaScript from the YouTube API updates the DOM in the correct way without any errors printed in the JavaScript console.
Additionally, even the didFinish WKNavigationDelegate function is invoked telling that everything was loaded correctly.

When applying a navigationViewStyle modifier with a StackNavigationViewStyle the YouTubePlayers are all shown correctly.

NavigationView {
   // ...
}
.navigationViewStyle(StackNavigationViewStyle())

screenshot

@SvenTiigi
Copy link
Owner

Closing issue.
Continued in #4

@jackpal
Copy link
Author

jackpal commented Oct 17, 2021

Thanks for looking into this! Another work-around (that works for my application) is to remove portrait and upside-down portrait from the permitted orientations of the app.)

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