Better page load performance when loading multiple embedded Youtube videos?

前端 未结 4 1592
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-04 06:10

I have a page which displays multiple (usually 10) embedded videos. The videos use the new IFRAME embed code of youtube and apparently for every IFRAME there is a separate reque

4条回答
  •  伪装坚强ぢ
    2021-02-04 06:28

    Check out this solution: Load the YouTube Video Player On-Demand

    Basically, it's like replacing your YouTube video iframe player codes with jQuery when clicking some thumbnails.

提交回复
热议问题