- From: Fuwei Chin via GitHub <sysbot+gh@w3.org>
- Date: Mon, 19 May 2025 00:25:49 +0000
- To: public-device-apis-log@w3.org
I think it would best to design the feature by extending Media Query, as the below dummy examples show: ```js if (window.matchMedia('(prefers-reduced-power: reduce)').matches) { console.log("The browser is working in power saving mode, e.g. rendering page at 30fps"); /* Windows / power mode - best battery life or macOS, iOS / Low Power Mode or Chrome OS / Energy Saver mode or Android / Battery Saver mode */ } ``` ```css @media (prefers-reduced-power: reduce) { /* avoid high-energy-consumption effects */ } ``` ```html Show HDR animation if capable and preferred. <picture> <source srcset="./demo-hdr.apng" media="(dynamic-range: high) and (not (prefers-reduced-power: reduce)) and (not (prefers-reduced-motion: reduce))" /> <img src="./demo-sdr.png" /> </picture> ``` -- GitHub Notification of comment by fuweichin Please view or discuss this issue at https://github.com/w3c/battery/issues/9#issuecomment-2889309033 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 19 May 2025 00:25:50 UTC