如何从我自己的手机应用程序链接了YouTube播放列表的官方应用程序

问题描述 投票:0回答:1

我工作的离子应用。我已经成功地已经能够使用我的应用程序打开的YouTube官方应用程序中使用下面的打单视频:

youtube://kVHB26MAh2E

不过,我想在官方应用程序打开一个播放列表页,所以我尝试这样做:

youtube://playlist?list={my playlist ID}

但没有奏效。语法是为这些“深层链接”有点不同,所以正好我缺少什么?

非常感谢你!

如果有帮助,这是我如何管理后备网址。我触发与openYouTube()最初的电话:

  launchExternalApp(iosSchemaName: string, androidPackageName: string, appUrl: string, httpUrl: string, id: string) {
    let app: string;
    if (this.platform.is('android')) {
      app = androidPackageName;
    } else if (this.platform.is('ios')) {
      app = iosSchemaName;
    } else {
      this.iab.create(httpUrl + id);
      return;
    }

    this.appAvailability.check(app).then(
      () => { // success callback
        this.iab.create(appUrl + id);
      },
      () => { // error callback
        this.iab.create(httpUrl + id);
      }
    );
  }

  openYouTube() {
    this.launchExternalApp('youtube://', 'com.youtube.android', 'youtube://playlist?list=', 'https://youtube.com/playlist?list=', 'PLTzXf6BfROEktE823y4AuhQrvJP2ZuX6q');
  }
ionic-framework youtube
1个回答
1
投票

我想出如何做到这一点:

youtube://youtube.com/playlist?list={id}

这至少适用于iOS,我没有测试过的Android呢。

© www.soinside.com 2019 - 2024. All rights reserved.