What is the most efficient way to load YouTube videos through jQuery on a user click?

前端 未结 3 904
半阙折子戏
半阙折子戏 2021-02-06 10:04

I\'m trying to determine what is the most efficient way to load videos into a on a user click using jQuery.

To give more context behind this, I\'ll have about 30 clips

3条回答
  •  [愿得一人]
    2021-02-06 10:34

    You could also try to have jQuery change the iframe src property.

    You might run into trouble with the iframe in Internet Explorer. This page describes the problem: http://osdir.com/ml/youtube-api-gdata/2011-03/msg00369.html
    If you can put in conditional scripting that will use the flash embed instead of the iframe if it is in Internet Explorer, that might be the best way to do it.

提交回复
热议问题