Go
Not registered? Sign up!

swfobject.js vs Embed HTML

Google Translate
10 posts | return to the General Chat forum | get the rss feed for this thread

Feb. 18, 2009TomH

Question:
Say I wanted to provide an HTML sample for copy and pasting embed tags, next to the video. If I'm going to be generating the embed tag HTML already, what's the point of having a separate swfobject.js? In my case, would swfobject.js be superfluous?

Feb. 20, 2009Dave

The savvy web developer uses Swfobject not just because it does the embedding, but because it does the embedding in a way that maximises the number of browsers that display it the same. Embedding is still a rather dark art and swfobject ensures you don't have to be a psychic to predict what browser your visitors are using.

Another important feature is that Swfobject also supports the provision of alternate content for users without JS or Flash installed/enabled, so that a pleasant, helpful message is display to try and improve installation and viewing of your video.

The point of still using swfobject therefore, is because you want users to view the videos on your site, right? Swfobject helps ensure the maximum possible number of users will see the video and if they can't see it, they'll be told how to see it in your 'alternate' content.

Its one thing if users can't watch the video after someone has cut and paste the embed code you provide onto another site, but its a complete fail if users can't even seen the video on the origin site!

Sites that provide users with bog-standard html tag embedding, do so not because that method is sufficient (far from it) but simply because its ridiculous to ask users to do it this advanced way.

May. 11, 2009birublone

i cann't understand about embed html.
how can run it?

Jul. 13, 2009fahim

where will i get the file swfobject.js

Jul. 13, 2009lost

 
"where will i get the file swfobject.js"

    http://www.google.com/search?hl=en&q=swfobject&aq=f&oq=&aqi=g%3Ap2g8

Make sure that you get the correct version (1.5 or 2.2) for the code format that you are using.

Aug. 19, 2009jim g

I don't understand this -- We've used the standard object-param-embed tags for quite some time, with cross-browser compatibility across A-grade browsers, with no problems. Adding another JS library to do this seems like a performance hit, and it doesn't degrade automatically for non-JS clients, among other things.

Aug. 19, 2009Greg

95% of web users have Javascript enabled. So that point is moot.

If you are looking for the RIGHT method for embedding Flash players in a modern, efficient site, swfobject is the way to go. There are a few reasons:

1) Many active embeds on a page are slow, and unreliable. Using swfobject, you can instantiate your Flash players as necessary on-click, instead of having them load as the page does.

2) Using a good swfobject implementation, you can instantiate your browsers after the DOM has been formed. This is just good practice.

3) Adding and removing swfobject instances as needed is a sure-fire way to keep your page from bogging down the users' browser when they aren't in use (this is great for modal implementations).

4) swfobject is light-weight; I would say any performance hit (if there were one) would be more than offset by the potential gains.

Aug. 19, 2009lost

The advantages of using swfobject v2.x loaded from Google's CDN:

    Loading from Google AJAX Libraries API:

        http://pipwerks.com/journal/2008/11/11/swfobjectjs-finds-a-home-on-google-servers/


    How & Why You Should Use Google CDN:

        http://webmuch.com/how-why-you-should-use-google-cdn/
 
 
And finally, reading the documentation may enlighten you a bit.

      http://code.google.com/p/swfobject/wiki/documentation
 
 
Oh, and did I mention that swfobject has an extensive API?

      http://code.google.com/p/swfobject/wiki/api
 
 
Now days, most users are doing much more than just embedding a Flash banner, so swfobject becomes quite useful to them.

Oct. 30, 2009Aaron Winborn

Some specs simply require a javascript-less, standards-compliant solution, unfortunately.

Oct. 30, 2009walesa

You can just copy & paste the object code that swfobject generates into your HTML — issue solved.

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.