YoutubeVideoPlayer doesn't work

I’m trying to use YoutubeVideoPlayer to do some kind of deep linking when I have a video, but I’m getting some troubles, first, it doesn’t work on my browser/chrome and when I tried to export to IOs i’m getting the next error:

> /***/mobile/platforms/ios/***/Plugins/cordova-plugin-youtube-video-player/XCDYouTubeVideoPlayerViewController.h:36:50: warning: 'MPMoviePlayerViewController' is deprecated: first deprecated in iOS 9.0 - Use AVPlayerViewController in AVKit. [-Wdeprecated-declarations]
 > In module 'MediaPlayer' imported from /Users/***/platform/frontend/mobile/platforms/ios/***/Plugins/cordova-
plugin-youtube-video-player/XCDYouTubeVideoPlayerViewController.h:5:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMoviePlayerViewController.h:16:12: note: 'MPMoviePlayerViewController' has been explicitly marked deprecated here
@interface MPMoviePlayerViewController : UIViewController

Do you have any idea how can I fix it?

Thank you!

1 Like

@federicoAlvarez I have the same issue. How did you resolve?

What i did:
Change in YoutubeVideoPlayer.m file
#import "XCDYouTubeKit.h"

for this:
#import "XCDYouTubeKit/XCDYouTubeKit.h"


Change in YoutubeVideoPlayer.h file
#import "XCDYouTubeVideoPlayerViewController.h"

for this:
#import "XCDYouTubeKit/XCDYouTubeVideoPlayerViewController.h"

Regards.