Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Multiple players on the same page - WP plugin

6 replies [Last post]
Reply

Hello,

I'm experimenting with a JW player plugin for wordpress to see does it meet my requirements.
I like the easy way of using already hosted videos (eg. youtube), skinning and plugins.

One thing i really don't like is calling and downloading .SWF player multiple times. If i have 5 videos on a page, .SWF file will be loaded 5 times. This really slows down page loading and cause increase CPU usage.

Also, skin and plugins are loaded again all 5 times. That's at least 15 additional http queries and additional 530 KB for player.swf + 140 KB for player.js and few other KBs for plugin + skin.

Is there a way to update wordpress plugin so it will call player.swf, plugins and skin only one time, at a beginning and next time just use its in a div for example?

I'm developing www.lolme.org website.
For now its in a beta stage, trying to get the most of few flash/html5 players to find the best one to stick on it.

Thanks,

Dudu

Reply

If I can/may suggest is for you to visit my web site.
There I have multiple examples that use more than one instance of the JWPlayer AND only loaded once. This can be especially seen in action with the 3D transparent cube where you can run on all of the cube's faces the JWPlayer which was only declared once.
visit mirana.net

You also have to opportunity to view the coding used for the JWPlayer instantiation(s).

Hint: use the load function feature of the JWPlayer

Reply

Hello Willie,

I saw your website yesterday while i was searching the forum.
Very nice website and very nice examples. You gave me idea to fallback to HTML5 by default. On this way, i will bypass loading of .swf player everytime, so only loading of skins, config files and plugins will remain. Still pain, but less bandwith.

Also to note, you are loading the same config file glow.xml 6 times on transparent cube :/

Reply

Again to say, this is very important optimization fix, its a high priority. Devs?

Reply

@Dudu,

There's not much that can be done in terms of how the WordPress plugin works. If you have 6 players on the page there needs to be 6 references to the player.swf.

Whether it gets downloaded 6 times or not is dependent on the caching rules you have setup. If you tell the browser to cache the files, you may still see a request but it will end up just using the locally downloaded file already. Basically you'll need to do some server side configuration to control the caching headers that get delivered to the browser.

Thanks.

Reply

Cameron, it can be done by requesting player.swf only once, and then calling it.

I have enormous "aggressive" cache. I have properly configure it.
When i use Firefox, player.swf is downloaded once, but again there is several requests.
When i use internet explorer 9, player.swf is being downloaded few times per page.

I think it should be fixed. It can be fixed, so it will be nice to improve player performance. :)

Greetings

Reply

@Dudu,

As I said there is no way to get rid of the multiple requests. This is a function of how Flash works. There is no concept of loading it once and referring to it later. It's similar to putting multiple <img/> tags on your page.

Thanks.

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options