start
start(): voidSource: main.ts:180
Manually starts listening for orientation updates.
Requests sensor permissions if not yet granted, and attaches device orientation listeners. Note: Browsers require a secure context (HTTPS) for device sensor APIs.
Returns
void
Example
CODE
import { deviceRotation } from "web-orientation";
// When startOnInit is set to false:
document.getElementById("start-btn").addEventListener("click", () => {
deviceRotation.start();
});