Closed beauxq closed 3 years ago
Using nativeWakeLock, calling disable when it's not enabled results in thrown exception. Cannot read property 'release' of null
nativeWakeLock
disable
Cannot read property 'release' of null
The other 2 methods (oldIOS and the video method) don't throw exception calling disable when it's not enabled.
oldIOS
This change makes it so all 3 methods do nothing if disable is called while already disabled.
Note the documentation for HTMLMediaElement.pause()
HTMLMediaElement.pause()
if the media is already in a paused state this method will have no effect
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause
This PR contains a:
inconsistent behavior between the different ways of preventing sleep
If someone was relying on this inconsistency for some reason...
Fixed by 7aa6c05928d3be452444d569b6fa4422d08deb50!
Using
nativeWakeLock
, callingdisable
when it's not enabled results in thrown exception.Cannot read property 'release' of null
The other 2 methods (
oldIOS
and the video method) don't throw exception callingdisable
when it's not enabled.This change makes it so all 3 methods do nothing if
disable
is called while already disabled.Note the documentation for
HTMLMediaElement.pause()
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause
This PR contains a:
Motivation / Use-Case
inconsistent behavior between the different ways of preventing sleep
Breaking Changes
If someone was relying on this inconsistency for some reason...
Additional Info