Press any key to continue

The recently released Flash Player 10.1 rc contains a couple of enhancements which are worth of a quick note.

Screen savers and video playback

An annoying behavior in older Flash Player versions is the fact that passively consumed content, video specifically, does not prevent the screen saver from kicking in. After some conversation here internally we think we finally have a good answer how to solve this problem. If all of the following conditions are true the screen saver is prevented from kicking in even if you are not in full screen mode:

1. Video is playing
2. Video is not paused or stopped
3. Video is not buffering
4. Sound is playing
5. Sound has a volume (this makes sure that silent ads do not cause harm)
6. The SWF is currently visible (with some caveats on platforms and browsers, see next paragraph)

So no more tapping the keyboard while you are watching a video!

Determining the visibility of SWFs

In my previous post I have mentioned that we now throttle the player whenever a SWF is not visible. Well, I wish we could make this work consistently. As of today we can not always determine if our instance is visible. There is no standard way of doing this, every browser works slightly different.

Here is the current status:

IE
7/8
Win
Firefox
3.6
Win
Opera
10.1
Win
Safari
4.0.5
Mac
WebKit
nightly
Mac
Firefox
3.6
Mac
Firefox
3.7
Mac
Firefox
3.x
Linux
We know if our SWF instance is on a hidden tab YES YES NO YES YES NO NO NO
We know if our SWF instance is scrolled out of view YES NO NO YES YES NO YES NO

Each time you see a NO we can not throttle SWFs to use less CPU resources. These limitations are dictated by the browser so it will take some time to sort this out.

If you have Flash Player 10.1 rc installed, here is something simple to try out: Go to this page (skip the ad):http://www.nickjr.com/kids-games/ants-adventure.html. Now either put the page on a hidden tab or scroll to the bottom of the page so the SWFs are not visible. In IE on Windows and WebKit nightly on the Mac you should see that the CPU usage drops significantly after a couple of seconds because we throttle the SWFs.

I believe this problem can be easily fixed in Firefox Mac and most of the other browsers going forward. On Linux however this will be much more tricky because of GTK (the framework we have to use). We will probably need a special NPAPI extension and lots of browser changes to make this possible.

Leave a comment

11 Comments.

  1. Do the problems regarding a Linux implementation also apply to Linux based mobiles?

    Thanks for the update.

  2. Would the move by Adobe and Google for a standard plugin architecture resolve this inconsistency?

  3. If a swf goes full screen, do you throttle the rest of the swfs?

    I think it makes sense.

    Regards

  4. What about Google Chrome or Firefox 3.7 windows?

  5. Great update, thanks.

    Do you have the issue number for your request in the Mozilla tracker so we can all pile in and vote for it ?

  6. Is there specification somewhere on how this throttling should be triggered? I see that Firefox seems to set coordinates in NPP_SetWindow to 0,0 but I would like to have some official documentation on it.

  7. Just wanted to say, Thanks Tinic for your knowledge and time you’ve lent to us previously and the good work you do.

    But I have a new question now, as Flash Player don’t really use Core Video how well if at all do the new VDADecoder (Framework – http://developer.apple.com/mac/library/technotes/tn2010/tn2267.html) library work for decoding video for the Flash Player in Macs? It’s really the only chance I guess to have it working without getting special drivers/libraries from the graphics vendors (mainly nVidia).

  8. catchy little title, LOL

  9. Hello,

    in recent Flayer Player 10.1 rc2, direct wmode does not work on Tiger OSX anymore… The area of the Flash player will stay empty.

  10. Wow… good information.

Trackbacks and Pingbacks: