【问题标题】:Use the YouTube Iframe API's loadVideoById without automatically playing使用 YouTube Iframe API 的 loadVideoById 而不自动播放
【发布时间】:2016-08-07 21:21:38
【问题描述】:

我正在使用 [YouTube Iframe API][1] 使用 [loadVideoByID][2] 方法在播放器中的视频之间切换,但它总是在加载后播放视频。我不希望它自动播放。

player.loadVideoById({
  videoId: 'abcd1234'
});

【问题讨论】:

    标签: youtube-iframe-api


    【解决方案1】:

    我相信您正在寻找的功能是:

    player.cueVideoById({
      'videoId':'abcd1234'
    })
    

    这个功能会一直等到你说可以播放。干杯:)

    【讨论】:

      猜你喜欢
      • 2012-04-04
      • 2023-04-09
      • 2018-07-14
      • 2015-10-09
      • 2017-08-18
      • 2015-04-11
      • 2012-10-06
      • 1970-01-01
      • 2019-01-22
      相关资源
      最近更新 更多