Chrome 89 Beta: advanced hardware interactions, web sharing on desktop
blog.chromium.org
blog.chromium.org
Also NFC support is huge - I can imagine all kinds of neat activation features for a website. Imagine sending a flyer in the mail with an NFC chip built in and then having a webpage verify based on this... Lot of really neat IOT apps that can be created with this feature...
BLE is amazing and I really wish we had the query permissions API... since that would allow for heart monitors and other permeant native app like experiences...
But NFC is currently locked on all iOS devices.
I wish Safari implement something like WebNFC soon. I just dont like QR Code.
None of the new APIs (except web sharing) advertised in the original post will be implemented, as a matter of fact. For the same reasons.
Their positions are open and are helpfully tracked by Chrome. See a rundown here [1]. I wish more people paid more attention to Google's shenanigans.
Agree. Thanks for pointing it out.
I dont follow Chrome / Web App development closely ( I only like to work on Web pages ). But I am well aware of Google's shenanigans, dating back when they first state their "Do No Evil" BS.
Typing that makes me feel old. That was nearly 20 years ago.
Just through that alone, QR codes will be a default choice over NFC.
NFC feel to be on the way becoming a US version of FeliCa.
I'm specifically thinking of a very niche type of device, specifically an inexpensive VGA/analog video capture usb "stick" called "EasyCap". This particular name has been re-used by many manufacturers who all sell EasyCaps with different chips in them, which makes finding a working driver a complete nightmare across almost all operating systems.
After much research, it turns out that Linux had native support for the chip in my EasyCap, and I was able to capture video using ffmpeg (under VirtualBox running on macOS). Happy to share notes! (reply here or email me)
Insane list of different drivers for EasyCaps under Windows: https://visser.io/2015/06/easycap-drivers-for-windows-8-1/ ("Below is a link to the Windows 7 drivers that were compatible with my EasyCAP device and further down a list of other EasyCAP drivers you can try.")
Info on existing versions/chips & Linux support: https://www.linuxtv.org/wiki/index.php/Easycap ("It seems that EasyCAP is not a company or brand name, but some chinese manufacturers use this label for at least four completely hardware different clones of equally looking audio and video capture devices. EasyCAP devices and clones are vastly sold in onlineshops at low prices.")
https://en.m.wikipedia.org/wiki/USB_human_interface_device_c...
In all cases -- got it. HID -> not webcams. :-)
Cheers!
> There is a long tail of human interface devices (HIDs) that are too new, too old, or too uncommon to be accessible by systems' device drivers. The WebHID API solves this by providing a way to implement device-specific logic in JavaScript.
> (...)
> The inability to access uncommon or unusual HID devices is particularly painful, for example, when it comes to gamepad support. Gamepad inputs and outputs are not well standardized and web browsers often require custom logic for specific devices. This is unsustainable and results in poor support for the long tail of older and uncommon devices.
So instead of only having to implement support for these devices once (in the browser), they now expect every website that would need support for these kind of devices to write their own code to handle all these ‘long tail’ input devices ?
How does that not make the problem infinitely worse ?
Instead of convincing one party to implement and support the code to handle your obscure HID, now you beee to convince potentially millions of websites. All running different implementations with their own unique bugs and issues.
This sounds less like an effort from the Chrome team to add support for these devices and more like a way to make it someone else’s problem.
The issue of "every site needing to reimplement every gamepad" can be fixed by developers making libraries with those implementations.
Are you suggesting developers will gain power by buying in to these APIs? If you are, then let me remind you of a slippery slope known as "lock in". Never, is when a developer is empowered by lock in.
Sure, but that means you as a device manufacturer have to convince all these websites to include your library and support your device. Why not have e.g. generic gamepad support in Chrome and let developers write a driver for their devices as an extension ?
Now all you get is horrible fragmentation, your device may work on website A but not on website B, and maybe kinda work but very buggy on website C.
It’s a recipe for a shitty user experience. In practice you’ll see that only a handful of popular devices will be universally supported.
All the browsers have generic gamepad support at this point: https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API Unfortunately, it is a bit lowest common denominator.
WebHID is good for long tail devices, or handling more unusual features of specific devices: https://web.dev/hid-examples/
And that’s exactly why it will never be widely used. I’m not saying that there isn’t a use-case for it, I’m saying that the article overstates the usefulness of this API.
If you've made a specialized controller that needed something other than generic gamepad support, and a webapp, and you wanted them to talk to each other, your previous option was to lobby browser vendors to add support. Now you can build that integration yourself. I don't see how that's something to complain about
I have the opposite concern: is it guaranteed that accessibility software will be able to spoof the kinds of inputs a site expects? And will my browser be able to generate dummy input data of the format a site demands, for the occasions that I don't want the site to have live access to that particular sensor/input?
Also, how much memory do these changes involve? With these chromium updates every single elektron app I use will be affected?
Though not to underestimate the vulnerabilities some of these advancements bring. Some tech such as Bluetooth have been exposed to security bugs in the not so recent past. Am also partly concerned about how complex & almost OS-like browsers have become today. Read ChromeOS etc. They also expose too much information at the hardware level to webpages.
Though as complex as the big browsers get. We'll always have simple browsers such as Webkit-based Epiphany that still stay true to the traditional Web browser in essence.
Who knows, when all this is over someone might make a browser for this new browser OS.
Gary Bernhardt saw this coming long back. https://www.destroyallsoftware.com/talks/the-birth-and-death...
uBlock Origin may not be willing to change, but other adblockers will fill that niche.
https://github.com/mozilla/standards-positions/issues/336
https://github.com/mozilla/standards-positions/commit/18aa5e...
It looks like navigator.hid.getDevices() will only return devices that the site has previously explicitly requested (with the vendor and other IDs) and the user has granted permission to access.
So it doesn't look like drive-by enumeration is possible with this - websites have to explicitly request to connect to a specific device, and the user must manually approve each device.
The API made a lot of sense to use on mobile - for example to send an SMS. You need to use apps to share. Bringing it to desktop, it may actually be less usable than just putting social share buttons directly on the page. I don't know a lot of people that use the OS-level apps on desktops (e.g. contact sync or logging into facebook). Does this end up a glorified `mailto` button for most people?
As an example, I wanted to create a web extension to automatically add something to Anki via AnkiWeb. The share API seemed to be the natural way to do this, but with it unsupported on desktop, that approach was dead in the water.
I absolutely second this btw. Being able to use something like https://snapdrop.net/ from the share menu would finally add AirDrop-like convinience to the web.
My problem is that this just isn't a pragmatic choice right now. The chicken-and-egg problem is somewhat true, but the carrot was already there for web devs - iOS and Android implement web share. And it's an excellent UX - better than anything you can make yourself.
The problem with the desktop share experience is that it is strictly worse than putting 2-3 social buttons & copy link for 95% of people. Neither Facebook nor WhatsApp support the share target API right now (quick post-edit: Twitter does though). Even if they did, there's another hurdle [1]:
To register your app as a share target, it needs to meet Chrome's installability criteria. In addition, before a user can share to your app, they must add it to their home screen.
So, again, pragmatically what people are going to start doing is - change from "if (navigation.share)" to "if (navigator.share && isMobile)". And I think that sucks - there will have to be another slow-moving wave of change once the desktop share is "good enough" to enable for everyone.I built various web interfaces to BLE devices and use the web BLE API but the biggest annoyance is having to select the device every time interactively. I really wish it were possible to "remember" access to devices that have already been given permission in the past. I wonder if the Web Serial API can do this over Bluetooth ...
https://bugs.chromium.org/p/chromium/issues/detail?id=101494... is the bug.
I opened up the demo that flashed my backlight keyboard (after chrome prompted for some generic hardware permissions) and, while it was cool, I'm not entirely enthusiastic about websites being able to control my hardware like this with such low user intent.
WebUSB is considered harmful by both. As is WebNFC if I remember correctly.
WebHID has the same concerns as WebUSB.
Moreover, some of these are implemented and rushed into stable versions of Chrome even before other browser implementors even had the chance to weigh in on the specification. See, for example, https://github.com/mozilla/standards-positions/issues/459
Seems odd that OSX isn't getting this feature. Anyone know what prevents that?
It is good that Google still allows Firefox to exist. I hope this love for my go to browser lasts. Every day I pray it will last. I'm scared though, because deep in my heart of hearts, I know it won't last.
Edit: I removed some stuff I first wrote.
> It’s both surprisingly and dismayingly difficult to get people — especially computerists — to criticize the web and the web browsers — even more so perhaps today.
Definitely agree with this. People tend to view it as something handed down to them by Gods. It's not.
Edit 2: This needs a larger discussion. I just posted it as a new submission.
Unfortunately this path doesn't allow for much targetted advertising opportunities, so that's why Google et al wisely abandoned this path. ( /s )
The fact of the matter is that web still seems to be the last bastion of freedom where you have a decent chance of publishing your software without begging for approval from a Californian. It's also inherently portable and doesn't care which brand of laptop or phone did you buy.
Which is why the rent seekers are trying so hard to dismantle it instead of empowering it.
It's also inherently portable and doesn't care which brand of laptop or phone did you buy.
...as long as it's running Google's software.
I’m perfectly fine with crippled browsers. In fact I prefer them to be. Even current browsers are way beyond scope and IMO should be slimmed down.
Mozilla is increasingly on the Apple's side these days.
Why does Mozilla need permission from Google to exist? That sounds very very wrong.
By raising the bar on shiny but non-essential features, they make it harder for an open source browser to play. The new features may be fun options today but sooner or later those features will become standard, and website X won't work without Chrome.
From TFA:
> There is a long tail of human interface devices (HIDs) that are too new, too old, or too uncommon to be accessible by systems' device drivers
I can easily imagine a banking website one day requiring custom USB drivers for security. Similar things happened with ActiveX and IE in the MS EEE days.
There's a reason the word "deprecate" occurs so ridiculously often in the web development --- Google's weapon of monopoly is change: they are basically trying to outrun competitors. It's not Microsoft's proprietariness, but a brazenly open show of sheer power.
But if it were a strategy, "EEE" or "Embrace Extend Extinguish" is not a good term for it. Maybe call it EEEE. "Extend Extend Extend Extend".
There's a good argument to be made that WebHID is exactly that. There is already a HID API. This new one is just supposed to be "better" ... somehow... in some way... I'm not exactly sure what it is... but some googler on the internet says you should support it.
(I wasn't using any third-party filtersets at the time, so I found uBlock unimpressive and stuck with Adblock Plus for quite a while because I found its UI better for curating my own blocking rules.)
AFAIK there are esoteric features like DNS filtering which is not possible with declarative API. But I’m not sure if it’s used widely, I never saw it.
Even IE6 was not such a security model garbage. Even ActiveX was trying to sandbox itself from access to the hardware.