Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect if Safari power saver mode is enabled?

I'm experiencing issues with the YouTube player failing to load when the power save mode is enabled in Safari 6.1 and 7 on OSX. The issue doesn't happen if the youtube user is using the experimental HTML5 player, but it's still in beta and most people are still using the Flash player. The "disable plugins to save power" option is on by default in most new versions of Safari and this causes the YouTube iFrame API to enter an endless loop as it tries to initialize the player.

Is there any attribute on the window or navigator objects that would possibly indicate that the power save mode is enabled so that I can warn users?

like image 852
Soviut Avatar asked Jan 15 '14 18:01

Soviut


People also ask

How do I turn off Safari Power Saver?

With that in mind, launch Safari and head to Safari > Preferences in the menu bar. Click on the Advanced tab and find the box labeled Stop Plug-ins to save power. Uncheck this box to disable Safari Power Saver.

How do I know if battery saver is on?

Go to Settings > Battery > Power Saver Mode to toggle it on or off. Tap Turn on at specified battery level and Turn off automatically to switch the mode on or off when the battery is at a certain percentage.

Does power saving mode turn on automatically?

Now, just go back to using your Android device—and whenever its battery level falls below 15 percent (or 5 percent, depending on the setting you picked), “Battery saver” mode will turn on automatically.


1 Answers

This issue is semi-intentional. The Power Saver mode in Safari deliberately stops flash content. You can read more about it in this article.

If the flash content is 'front and centre' (within a 3000 x 3000 pixel boundary starting at the top left corner of the document) it should still play. So it may help, if the youtube video is off to the side of the page, to try and centre it. Apple says content will not play if it is in the margins (see this page under the Safari Power Saver heading).

like image 77
bnp887 Avatar answered Sep 29 '22 23:09

bnp887