Skip to content

xzripper/SINE19000

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

SINE19000/S19K

This tiny module keeps the device screen awake without requiring HTTPS or SSL certificates, making it ideal for local development. It keeps the screen awake by playing an extremely low-frequency, low-resolution ~10kB video in the background.

The video was generated by FFMPEG, full command:

ffmpeg -f lavfi -i "nullsrc=s=10x10:r=10,geq=random(1)*255:random(1)*255:random(1)*255" -f lavfi -i "sine=f=19000:b=10:d=5" -filter_complex "[1:a]volume=-40dB[aud]" -map 0:v -map "[aud]" -t 2.5 -c:v libx264 -c:a aac SINE19000.mp4
  • Resolution: 10x10
  • FPS: 10
  • Frequency: 19kHz
  • Volume reduced by: 40dB
  • Duration: 2.5s

JavaScript showcase:

// Import the main function.
import { addS19K, setS19KActivity, removeS19K } from "https://xzripper.github.io/S19K.js";

// Add S19K on the page (S19K is automatically enabled).
addS19K();

// Enable/disable S19K.
setS19KActivity(false);

// Remove S19K.
removeS19K();

Also, injecting S19K requires a user gesture, consider wrapping injection into a click event or any other event.

That's it!

Warning

This project is intended only for legitimate use cases, such as preventing screens from sleeping in local development projects.
Do NOT use this library for malware, tracking, spying, or violating user privacy.
The author assumes no liability for misuse.


SINE19000 V1.0.3

About

A tiny module that keeps the device screen awake without requiring HTTPS or SSL certificates, making it ideal for local development.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors