()
| 351 | } |
| 352 | |
| 353 | const stop = () => { |
| 354 | if (raf !== 0) cancelAnimationFrame(raf) |
| 355 | raf = 0 |
| 356 | if (poll === undefined) return |
| 357 | clearInterval(poll) |
| 358 | poll = undefined |
| 359 | } |
| 360 | |
| 361 | const start = () => { |
| 362 | if (document.visibilityState !== "visible") return |