iOS 13 support for YouTubeStandaloneIOS
See original GitHub issueWhen using YouTubeStandaloneIOS
on iOS 13, the app crashes with error:
MPMoviePlayerViewController is no longer available. Use AVPlayerViewController in AVKit.
Looks like MPMoviePlayerViewController was deprecated and completely removed on iOS 13.
Example code:
YouTubeStandaloneIOS.playVideo(youtube_id)
.then(() => Orientation.lockToPortrait())
.catch(errorMessage => {
Orientation.lockToPortrait();
StatusBar.setHidden(false);
Linking.openURL('https://www.youtube.com/watch?v=' + youtube_id);
})
Related issue?: https://github.com/0xced/XCDYouTubeKit/issues/157 https://github.com/0xced/XCDYouTubeKit/issues/157#issuecomment-208328872
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
iOS 13 support for YouTubeStandaloneIOS #404 - GitHub
When using YouTubeStandaloneIOS on iOS 13, the app crashes with error: MPMoviePlayerViewController is no longer available.
Read more >About iOS 13 Updates - Apple Support
iOS 13.6 adds support for digital car keys, introduces audio stories in Apple News+, and contains a new symptoms category in the Health...
Read more >Install and set up Office on an iPhone or iPad - Microsoft Support
On your iPhone or iPad, open any standalone mobile Office app (for example, Excel). Sign in with your Microsoft account, or Microsoft 365...
Read more >Update Google Chrome - iPhone & iPad
To make sure you're protected by the latest security updates, Google Chrome can automatically update when a new version of the browser is...
Read more >iOS 13 - Wikipedia
Obsolete, because all devices that supported iOS 13 support iOS 14 and iOS 15 as well. Widespread third party app support. Drops support...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@davidohayon669 Please take a look my PR for this issue. #408
@thanhcuong1990 had to change your code a bit in bae6948ed77f2a0371b1ee9d38cb13756445f89a, the older implementation (MPMoviePlayer) was resolving the Promise on each dismissing of the player. Using the AVPlayer I’m not sure how to achieve that, there is no point in resolving the Promise only if the video actually finishes playing (which is what
AVPlayerItemDidPlayToEndTimeNotification
is for) this might never happen with regular use.If you can improve that implementation it would be great. My idea is to resolve with the promise when the playing is dismissed (The modal is dismissed) and reject if anything wrong happened between launching the modal and finishing playing the video (by dismissing the modal). AVPlayer errors should also dismiss the modal.