Is there any point in using the seamless and or sandbox attribute for YouTube iframes?

前端 未结 2 1771
滥情空心
滥情空心 2021-01-17 22:42

Update: This question is no longer valid. See comment below.

  1. YouTube embedding is done using iframes nowadays.
  2. HTML5 introduces the seamless attribute
2条回答
  •  伪装坚强ぢ
    2021-01-17 22:55

    No, fullscreen does not seem to work with both attributes enabled, if you are in the HTML5 beta check an example here: http://bcmoney-mobiletv.com/view/2133/monty-python-tax-sketch/

    However, when I leave the HTML5 beta program it plays back in the standard YouTube Flash player, which ignores those iFrame attributes completely.

    So, it really depends what your goals are. If you want added security and an experience that feels more like an in-page web video that is controlled by your page, go ahead and use those attributes, however, if you want to give the user a full range of controls and options, leave off sandbox and/or seamless.

提交回复
热议问题