Hide iOS Safari Native low-power Play Button
Found this sandbox: https://codesandbox.io/s/relaxed-franklin-h2zkhl?file=/src/scripts/index.ts:0-87
Apparently you can set a setTimeout
to autoplay without an autoplay
attribute.
It will throw an error on low power mode, but that can of course be caught.
Is it possible to access a mobile devices battery status or charge via a web browser api?
Thanks Tapani and Michael,
Your help definitely pointed me in the right direction. With the info you provided I was able to find more info on the spec and what browsers support the api.
- Chrome 42.0.2311.90 (64-bit) does not seem to support the battery API.
- Chromium Version 22.0.1225.0 (149762) also does not support the battery API.
- Chrome Canary Version 44.0.2387.0 canary (64-bit) supports the spec on MDN (https://developer.mozilla.org/en-US/docs/Web/API/Battery_Status_API) but does not support the navigator.battery namespace.
- Firefox supports the navigator.battery namespace but does not support the navigator.getBattery() function.
- Safari Version 8.0.5 (10600.5.17) doesn't support anything referring to the battery api that I can tell.
I didn't get around to checking this on mobile but I don't suspect that mobile browsers would be more consistent api or even have it implemented better than any of the above browsers. Seems fairly new and the browsers organizations are still trying to figure out and are struggling to follow the documented spec. Reminds me a bit of CSS flex-box a bit.
Thanks guys!
Background video not auto playing on safari browser used svelte to build the website
The video is encoded by AV1
which is not supported by Safari
entire apple ecosystem and Firefox
on Android source
Related Topics
Adding a Background Video with React
D3 Bar Chart Not Showing First Element in Array
How to Reasonably Animate Font Awesome Lock Icons
React Onclick Add Class to Clicked Element But Remove from the Others
Change the Fixed Navbar's Classes Depending on the Background of the Page Section It Hovers
Highlight Active Menu Item on Scroll
Highlight an Individual Word Within a Text Block on Hover
Change Image Onclick for a Set Amount of Time
Angular - Ngfor* Four Elements on Row
How to Replay a CSS3 Animation in Reactjs
CSS in My JavaScript Widget Colliding with Target Page CSS
How to Make Each Letter in Text a Different Random Color in JavaScript
Vanilla JavaScript: How to Toggle Multiple CSS-Classes in One Statement
Is There a Limit on Length of the Key (String) in Js Object
Android 4.2.1, Webview and JavaScript Interface Breaks
How to Enable the JavaScript Error/Debug Console for Safari Within Android