From d5c5a391db887724a05e633584f783281214b5e2 Mon Sep 17 00:00:00 2001 From: Mark de Groot Date: Wed, 23 Jun 2021 08:52:57 +0200 Subject: [PATCH 1/3] hotfix for failing get_video_info api request by referencing another XCDYouTubeKit version --- plugin.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/plugin.xml b/plugin.xml index 93f21b2..27f4909 100755 --- a/plugin.xml +++ b/plugin.xml @@ -1,6 +1,6 @@ - + CordovaYoutubeVideoPlayer @@ -56,8 +56,15 @@ - - + + + + + + + + + From 10d21f8423096bd9279855a0b5cbf05445662e9d Mon Sep 17 00:00:00 2001 From: Mark de Groot Date: Tue, 17 Aug 2021 18:10:48 +0200 Subject: [PATCH 2/3] Updated XCDYouTubeKit again and allow user to set Youtube Api key via preferences --- .../YoutubeVideoPlayer.m | 10 ++++++++++ plugin.xml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/platforms/ios/YoutubeVideoPlayerProject/Plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/YoutubeVideoPlayer.m b/platforms/ios/YoutubeVideoPlayerProject/Plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/YoutubeVideoPlayer.m index 30d8163..1a2f3d6 100644 --- a/platforms/ios/YoutubeVideoPlayerProject/Plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/YoutubeVideoPlayer.m +++ b/platforms/ios/YoutubeVideoPlayerProject/Plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/YoutubeVideoPlayer.m @@ -8,9 +8,19 @@ #import "YoutubeVideoPlayer.h" #import "XCDYouTubeKit.h" #import +#import @implementation YoutubeVideoPlayer +- (void)pluginInitialize +{ + NSString *api_key = [self.commandDelegate.settings cordovaSettingForKey:@"YouTubeDataApiKey"]; + + if (api_key != nil) { + [XCDYouTubeClient setInnertubeApiKey: api_key]; + } +} + - (void)openVideo:(CDVInvokedUrlCommand*)command { diff --git a/plugin.xml b/plugin.xml index 27f4909..1dcc49a 100755 --- a/plugin.xml +++ b/plugin.xml @@ -61,7 +61,7 @@ - + From c2f796996d68d0331602ba7b6d1b98d2ec18a580 Mon Sep 17 00:00:00 2001 From: Mark de Groot Date: Tue, 17 Aug 2021 18:16:33 +0200 Subject: [PATCH 3/3] updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4438eda..91b46f7 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ cordova plugin add https://github.com/JonSmart/CordovaYoutubeVideoPlayer YoutubeVideoPlayer.openVideo('YOUTUBE_VIDEO_ID', function(result) { console.log('YoutubeVideoPlayer result = ' + result); }); ``` -For Android 5.0+ you will need to add the following to config.xml +For Android 5.0+ and iOS you will need to add the following to config.xml ```xml