I developed this website for my JS practice and when I opened it in Brave, I noticed this. I developed it in Edge Chromium but I wanted to check how it looks like on Brave. It worked fine on Brave mobile but on desktop, it does not work. It works only on Chromium-based browsers and not Firefox. Pls if anyone can help me solve this issue
Basically, this is a site to show the charging of your device. But it is not working on Brave.
Have you tried adjusting the shield settings to see if that changes your results?
Yep. But the same thing. No changes. Does it work on your Brave desktop can u tell me pls?
I get the same thing you do on Brave (and Vivaldi), but I’m using a desktop at the moment.
Firefox just shows a black bar for the charging notification. I don’t know if that’s expected behavior for a desktop with no battery or not.
I’ll check on my laptop once I get home in a bit.
On Desktop. It’ll show charging and 100%. Because that’s what happening. It won’t work on Firefox because the API isn’t supported in Firefox. Pls inform me what do you get on laptop. Thanks
Testing in Brave stable, Beta, Developer and Nightly all have the site showing
Charging 100%. Is this not what it should be saying? Chrome shows the same behavior as well. What exactly is it that’s not working?
@mattches, Brave will allways show charging 100%, no matter what is the current battery state of the device.
Indeed @max_programming, for privacy concerns, the battery API has been tweaked by Brave so that it always returns same fake values (charging and 100%).
Yeah, it’s showing 100% there too. Looks like that might be the expected behavior on desktop/laptop computers.
Okay. So I also think the battery API is tweaked by Brave. But still it works on mobile
It is not working on Windows too. I am on a laptop and still it is showing 100% while my battery is 93%. It is maybe because Brave has tweaked the battery API. On desktops it will show 100% charging because that is what is happening. But on other devices, it should show the battery
Thanks a lot @Mattches. It seems like you are on a desktop. And because desktops are charging and they are 100%. It’ll show that.
It’s a fact @max_programming
And that behaviour (always charging 100%) should be the same on macOS, Windows, Linux and Android.
Not quite sure, but the only exception would be Brave for iOS.
On which mobile platform and Brave version do you see it’s working ?
It is working on Brave Android
What is your Brave version on Android?
On my end, on the current play store version (1.8.93), and probably since this (https://brave.com/rebuilt-brave-android/), the battery API behaves the same as in desktop Brave => your website is reporting charging 100%, despite the actual battery status of the device.
Yeah I updated Brave on mobile and now it is not working. It behaves the same as desktop. Is there a way to tackle this issue?
No, it’s a privacy concern.
It’s unlikely that it will change in future versions.
It was a laptop – not a desktop but regardless you’re right. I’m seeing the same results (100%) with Brave across different OS. Not entirely sure why this is the case but I did reach out to a couple of our web devs to have them take a look.
Upon further inspection, it seems like we block the Battery API that’s likely being utilized by your site:
Okay. I understand. Firefox and Safari also don’t have battery API. One request, can Brave throw an error in the console just like Firefox and Safari. So that I can show the message just like I show in these browsers:
By the way guys. I want to introduce my YouTube channel.
I am only 15 years old and I love programming.
I know it’s kind of an advertisement but I wanted to put this here. Thanks a lot for the help and support