[4.x.x] YoutubeVideoPlayer + iOS 13 - App is crashing when playing a youtube video
See original GitHub issueBug Report
Ionic version: 4.9.0
Current behavior: The app is crashing in iOS 13 when a youtube video is played. It was working fine in iOS 12 or earlier versions.
Expected behavior: The app does not crash in iOS 13 when a youtube video is played.
Steps to reproduce:
import {YoutubeVideoPlayer} from '@ionic-native/youtube-video-player/ngx';
export class MyPage {
constructor(
private youtube: YoutubeVideoPlayer
) {
...
}
...
playYouTubeVideo(videoId: string) {
this.youtube.openVideo(videoId);
}
}
Other information:
The console outputs the following error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'MPMoviePlayerViewController is no longer available. Use AVPlayerViewController in AVKit.'
Ionic info:
Ionic:
Ionic CLI : 5.4.2
Ionic Framework : @ionic/angular 4.9.0
@angular-devkit/build-angular : 0.801.3
@angular-devkit/schematics : 8.3.3
@angular/cli : 8.3.3
@ionic/angular-toolkit : 2.0.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : ios 5.0.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 16 other plugins)
Utility:
cordova-res : not installed
native-run : 0.2.8
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.4
ios-sim : 8.0.1
NodeJS : v10.14.2
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 11.2 Build version 11B41
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:11 (3 by maintainers)
Top Results From Across the Web
[4.x.x] YoutubeVideoPlayer + iOS 13 - App is crashing when ...
The app is crashing in iOS 13 when a youtube video is played. It was working fine in iOS 12 or earlier versions....
Read more >YouTube for iPhone and iPad repeatedly crashing [U: Fixed]
Over the past hour or so, some YouTube for iPhone and iPad users have reported that the app is repeatedly crashing on open....
Read more >Top 8 Ways to Fix YouTube Keeps Crashing on iPhone After ...
1. Check Network Settings · 2. Update YouTube App · 3. Check Router Network · 4. Clear Cache on YouTube App · 5....
Read more >YouTube acknowledges its iOS app is crashing, says it's ...
YouTube's mobile app on iOS devices is currently down for users. The company is aware of the crash and is working on fixing...
Read more >Fixed YouTube App not loading or Crashing on iPhone with ...
Fix YouTube crashing on startup or hanging or freezing while playing videos? It happens after a major iOS 16 update due to a...
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 FreeTop 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
Top GitHub Comments
Try to use this plugin, it did handle 13 OS, i have done a new fix to this plugin ionic cordova plugin rm cordova-plugin-youtube-video-player ionic cordova plugin add https://github.com/abomadi/CordovaYoutubeVideoPlayer
@rebekris in template HTML :
In Typescript :
Thank @abomadi, I tried your solution with capacitor and it works well.