Loading Youtube iFrame API video at a lower quality

后端 未结 1 946
遇见更好的自我
遇见更好的自我 2020-12-15 14:10

Currently, we have a YouTube iFrame API setup with the following (pretty boilerplate) code:

相关标签:
1条回答
  • 2020-12-15 14:43

    The workaround I found is to create the player with no videoId, never call setPlaybackQuality anywhere else, but call loadVideoById(videoId, 0, 'small') inside of your onReady handler. This was respected on both Android and iOS when tested, calling onPlaybackQualityChanged with 'small' once on Android and Desktop and twice on iOS, never forcing medium quality.

    Unfortunately, if you pass 'tiny', it doesn't seem to work. On most videos, it will force 'small'; in my experience, however, it's forced 'medium' before. Be aware of that.

    0 讨论(0)
提交回复
热议问题