# richtr/NoSleep.js

Prevent display sleep and enable wake lock in any Android or iOS web browser.

Repository: https://github.com/richtr/NoSleep.js
Canonical: https://ross.abutalabs.com/products/nosleepjs
Language: JavaScript
License: MIT
License Family: permissive
Topics: nosleep, wake-lock, javascript, android, ios
Last push: 2024-07-30T09:03:21+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4152, "days_push": 764, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2376, forks 368 (observed 2026-08-28T04:06:42.089025+00:00)

## What it is
NoSleep.js is a small JavaScript library that prevents the display from sleeping and enables wake lock in Android and iOS web browsers. It wraps the Wake Lock API with fallbacks so web apps can keep the screen on during playback or other long-running interactions.

## Use cases
- keep the screen on while a web app plays video or audio
- prevent display sleep during a mobile web game
- hold wake lock while showing a recipe or workout in the browser
- stop the screen dimming during a long-running web-based presentation
- enable wake lock after a user tap in a mobile web app

## When to choose
- you need to keep a mobile browser screen awake on Android or iOS
- you want a tiny dependency with a simple enable/disable API
- you need fallback behavior for browsers without the native Wake Lock API

## When to avoid
- you are building a native mobile app rather than a web app
- you only target desktop browsers where screen sleep is managed differently
- you need a maintained solution with active development and frequent releases

## Facets
- artifact type: library
- maturity: maintenance
- function: sdk, developer-tools
- domain: web-development, mobile-development, cross-platform
- platform: browser
- tags: wake-lock, screen-sleep-prevention, mobile-web, javascript-library, android, ios, javascript

## Member repositories
- richtr/NoSleep.js (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:42.089025+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:35:00.349226+00:00, confidence not recorded.
  - readme: https://github.com/richtr/NoSleep.js (fetched 2026-08-28T04:06:42.089025+00:00, sha a8e67ad4e862)
  - registry_npm: https://registry.npmjs.org/nosleep.js (fetched 2026-08-29T10:16:16.798423+00:00, sha 8e6e4a95f40a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
