Ionic 3 YouTube Player插件无法以纵向模式打开youtube视频

时间:2018-11-05 07:24:40

标签: ionic3

我正在使用离子YouTube播放器插件https://ionicframework.com/docs/native/youtube-video-player/在我的应用中播放youtube视频。问题是它只能以横向模式打开youtube视频,不能以纵向模式打开youtube视频,以下是我使用此插件的代码。

if (this.platform.is('ios')) {
  app = 'youtube://';
} else if (this.platform.is('android')) {
  app = 'com.google.android.youtube';
}

this.appAvailability.check(app)
  .then(
    (yes: boolean) => {
      this.youtube.openVideo(azkar.video_id.split('?v=')[1]); //using plugin method here
    },
    (no: boolean) => {
      console.log(zikrName.length);

      if(azkar.video_id == null){
        console.log(azkar.video_id);
        this.toastProvider.getToastAlert('Video for this zikr not available');
      }
      else{
        let iab = this.inAppBrowser.create(azkar.video_id);
        iab.show();
        }
    },
  );

0 个答案:

没有答案