Wake Lock API Tester - Online Prevent Screen Sleep
Request and release a screen wake lock to keep the device awake. See the lock state in real time. Perfect for recipes or presentations.
UD5 Toolkit
Test, monitor, and control the Screen Wake Lock API — keep your screen on while using this page.
navigator.wakeLock.request('screen')
to acquire a lock and returns a WakeLockSentinel object that can be released when no longer needed.
navigator.wakeLock will be undefined.
Here's a basic implementation pattern:
let wakeLock = null;
async function requestWakeLock() {
try {
wakeLock = await navigator.wakeLock.request('screen');
wakeLock.addEventListener('release', () => {
console.log('Wake lock released');
});
} catch (err) {
console.error('Failed:', err);
}
}
// Re-acquire on visibility change
document.addEventListener('visibilitychange', async () => {
if (document.visibilityState === 'visible' && !wakeLock) {
await requestWakeLock();
}
});
request() — has release() method and released readonly property.document.visibilityState and visibilitychange event to detect when the page is hidden/shown.navigator.permissions.query({name: 'screen-wake-lock'}) to check permission state where supported.Request and release a screen wake lock to keep the device awake. See the lock state in real time. Perfect for recipes or presentations.
Generate a pop signal to determine if speakers are wired in phase. Quick stereo test.
Display an astigmatism dial and instructions for self-assessment. Educational, not a medical diagnosis.
Hear a word spoken by browser TTS and type the spelling. Choose difficulty or paste your own list. Great for kids. Local only.
Load a video and visually check if audio aligns with lips. Use frame‑by‑frame stepping. Debug playback issues.
Unified input demo: see pressure, tilt, and type from any pointer. Compare pointerType values. Essential for drawing apps.
Paste your Accept‑Language header and see which languages your site should serve based on quality values. Internationalization helper.
Test how your page loads under slow, 3G, or offline conditions by intercepting fetch and applying delays. No DevTools needed.
Decode an image progressively using the ImageDecoder API. See partial results and metadata. Modern alternative to <img>.
Decode individual video frames from a local file using the VideoDecoder API. Step through frames. Cutting‑edge browser feature.
Demonstrate how the Web OTP API automatically reads one‑time codes from SMS (mobile). Simulation with a fake SMS input.
Acquire and release locks across tabs. Prevent race conditions in IndexedDB or localStorage. Visual queue and lock state.
Connect a gamepad and see all button presses and axis movements visually. Check that every input is detected correctly.
Trigger different vibration patterns on mobile devices. Test if your phone supports haptic feedback. Simple demo.
Check current screen orientation and test the lock API. Useful for mobile web apps. Demo with code.
Test the Fullscreen API: request fullscreen on a colored div, detect changes, and copy the JavaScript boilerplate.
Experiment with the Async Clipboard API: read/write text and images from the clipboard. Verify permissions and see demo code.
Test the Web Share API by sharing text, links, and files directly from the browser. Check compatibility and see example code.
Check if your browser and display support the wider DCI‑P3 color space. See the difference with a simple test pattern.
Enter an API URL and quickly check its HTTP status code and response time. See response headers and body. Browser fetch.
Generate random, formatted ID numbers that match pattern rules for various countries. For testing input validation. No real data.
Quickly test if your webcam, microphone, and speakers work correctly. See live video and audio meter. No data sent.
Generate random but realistic‑looking data arrays (users, products, orders) with typos and missing fields. For test robustness.
Simple interactive eye dominance test: hold up a virtual dot and see which eye stays aligned. Educational.
Build an iframe with different sandbox flags and see live which features are blocked. For secure embedding.
Simulate random mouse moves, clicks, or keystrokes to test idle‑timeout logic. Stops when you move the mouse. Dev test.
Paste a test card number to verify Luhn algorithm, identify issuer (Visa, MC), and check length. No real data.
Play left‑only, right‑only, and frequency sweeps to test your speakers or headphones. Quick audio check.
See a live VU meter of your microphone's input level. Test if your mic is working and adjust gain. Privacy‑friendly.
Combine multiple identical batteries in series and parallel and see the resulting voltage and total capacity. Electronics helper.