OBJECT Video Objects vs. IFRAME

A question has already been asked whether to use OBJECT or IFRAME to embed a video ...

Should I use <object> or <iframe> to load the video?

But my question takes this step further. If you specifically embed a video on YouTube, is there any advantage to using the OBJECT method, with the exception of those already mentioned in the above article?

Given that IFRAME will revert to HTML5 if Flash is not available to the viewer, why would anyone want to use the OBJECT method more?

David.

+7
source share
1 answer

The <object> insert has several differences. If you are writing a flash application, you cannot embed an iframe. Therefore, using swf will work for these environments. The API also only supports IE8 and above because it will be implemented using postMessage . If you just embed the video, the <iframe> will work fine, but if you want to access the API, your users will have to have IE8 or higher.

<iframe> is the supported and preferred method of using YouTube. In addition to what has already been mentioned about the ability to play HTML5 (which is the biggest advantage), the API is richer and compatible with other other embedded content.

+5
source

All Articles