Hi,
I have ionic 3 ionic cordova plugin add cordova-plugin-youtube-video-player and when test it in my device it doesn’t work.
package.json
"@ionic-native/youtube-video-player": "^5.0.0",
config.xml
<preference name="YouTubeDataApiKey" value="AIzaSyBU7865vDB9p9APyxKtJC2bjrpf7XqiVbo" />
home.ts
import { YoutubeVideoPlayer } from '@ionic-native/youtube-video-player/ngx';
constructor(private youtube: YoutubeVideoPlayer) {
}
openYoutube() {
this.youtube.openVideo('F9yf6TtVMmI');
}
home.html
<button tappable (click)="openYoutube()" class="btn-preview" ion-button color="light" outline small>TEST YOUTUBE</button>
please see screenshot.