Live data from Hacker News

TIL: You can access a user’s camera with just HTML

austingil.com

41–50 of 240 posts

Re: TIL: You can access a user’s camera with just HTML

#41

A lot of totally valid opinions out there about this, but I personally _love_ how the browser is becoming a very well-featured sandbox for shipping applications. For personal fun and learning, I'm making a complete 2D video game in ideally less than 1MB. It has 60fps graphics, full spatial audio, and gamepad support, all because the browser has a lot of these APIs that didn't exist when I was starting out my career.…

One thing I miss about adobe flash was the software available to create flash games and animations. It was relatively easy to use and felt like it had a good combination of graphical tools and scripting to allow you to create what you wanted

I wish there was something similar for but for modern browsers, taking advantage of HTML5 and all the browser API's available now which previously required a plugin like adobe flash.

As you mentioned the API's and capabilities are there, built right into the browsers now. I just wish the tooling was better.

Re: TIL: You can access a user’s camera with just HTML

#42

Hyper Text Markup Language ...why is a markup language for hypertext able to control my device's camera? Why have all the relevant standards bodies associated with this language and protocol gotten on board with turning a markup display language into a full-blown OS?

Because technologies evolve in surprising ways, and coming up with future-proof names for things is hard, and renaming existing things even harder.

Re: TIL: You can access a user’s camera with just HTML

#43

Hyper Text Markup Language ...why is a markup language for hypertext able to control my device's camera? Why have all the relevant standards bodies associated with this language and protocol gotten on board with turning a markup display language into a full-blown OS?

This is exactly what you’re implicitly asking for: deferring functionality to the OS. It doesn’t give the browser access to your camera (despite the title), it allows the browser to facilitate uploading a file produced by the camera. To the browser it’s no different than any other file input, which was standardized in HTML 3.0. To the OS, it’s not meaningfully different from opening a file picker dialog. To the user, it requires direct interaction to invoke, and while it can be abused it has the same limitations as any other file input, i.e. nothing is uploaded without further affirmative action by the user. This is much better than the JS standards which give sites the power to request interactive access to the camera (after asking permission).

Re: TIL: You can access a user’s camera with just HTML

#44

A lot of totally valid opinions out there about this, but I personally _love_ how the browser is becoming a very well-featured sandbox for shipping applications. For personal fun and learning, I'm making a complete 2D video game in ideally less than 1MB. It has 60fps graphics, full spatial audio, and gamepad support, all because the browser has a lot of these APIs that didn't exist when I was starting out my career.…

WebGPU feels like a godsend, I hope it gains popularity ASAP.

Re: TIL: You can access a user’s camera with just HTML

#45

A lot of totally valid opinions out there about this, but I personally _love_ how the browser is becoming a very well-featured sandbox for shipping applications. For personal fun and learning, I'm making a complete 2D video game in ideally less than 1MB. It has 60fps graphics, full spatial audio, and gamepad support, all because the browser has a lot of these APIs that didn't exist when I was starting out my career.…

> I personally _love_ how the browser is becoming a very well-featured sandbox for shipping applications.

Same.

My latest project is a waveform generator for wavetable synthesizers [1]; there are visualizations, as well as handling audio (not real time but still). I was surprised that I could build that as a web app and achieve good UX and performance.

[1]: https://merely.xyz/waves

Re: TIL: You can access a user’s camera with just HTML

#46
post #28

Hyper Text Markup Language ...why is a markup language for hypertext able to control my device's camera? Why have all the relevant standards bodies associated with this language and protocol gotten on board with turning a markup display language into a full-blown OS?

I find it incredible that people still think HTML, a spec first published in 1990 when we were using 386s with CGA monitors, shouldn't have evolved to utilise some of the modern features available on today's computers and phones. Why wouldn't we want to be able to do useful things on the web with our devices?

I'm not arguing that the trend is a bad one, but it does come with downsides that are significant for some. For instance, I certainly don't want every random website I might visit to have access to these abilities. It just strikes me as an unnecessary security risk.

Re: TIL: You can access a user’s camera with just HTML

#47

A lot of totally valid opinions out there about this, but I personally _love_ how the browser is becoming a very well-featured sandbox for shipping applications. For personal fun and learning, I'm making a complete 2D video game in ideally less than 1MB. It has 60fps graphics, full spatial audio, and gamepad support, all because the browser has a lot of these APIs that didn't exist when I was starting out my career.…

100%

And also doing this declaratively makes it so much easier to secure & build well-thought-out privacy & consent UX around.

An imperative API has so many variations on implementation approach for the end-developer / API consumer that the combinatorics become much more challenging for browser implementers.

(obviously imperative APIs for doing this already exist, but the existence of this declarative API at least makes limiting imperative API access less draconian/severe as a measure).

Re: TIL: You can access a user’s camera with just HTML

#48
post #14
post #5

Reason #368 why I cover all cameras and disable mics by default, and only uncover/enable when in use.

You cover your phone camera? This only works on mobile and pops up the native Android/iOS camera which requires you to actually take the picture (and at least on iOS, asks you to confirm you would like to use the photo before going back to the website)

I habitually cover the camera on my phone when I'm not using it. It's just common sense for any connected device running complicated software without hardware switches to turn the sensors off reliably. The latter would be better of course but there wasn't a practical option for it last time I was looking for a new phone.

Re: TIL: You can access a user’s camera with just HTML

#49
post #35

A lot of totally valid opinions out there about this, but I personally _love_ how the browser is becoming a very well-featured sandbox for shipping applications. For personal fun and learning, I'm making a complete 2D video game in ideally less than 1MB. It has 60fps graphics, full spatial audio, and gamepad support, all because the browser has a lot of these APIs that didn't exist when I was starting out my career.…

And theres a LOT more APIs than people realize: https://developer.mozilla.org/en-US/docs/Web/API Some interesting ones: - Screen recording/capture - Battery status - Barcode Detection - Bluetooth - Sensors (e.g. Accelerometer) - Wake/screen lock - Color picker - Vibration - MIDI - USB - Contacts picker - Presentation (AirPlay, Chromecast) - Virtual reality

These are all Javascript APIs. I think what's particularly notable about the OP is that it's HTML.

Re: TIL: You can access a user’s camera with just HTML

#50

A lot of totally valid opinions out there about this, but I personally _love_ how the browser is becoming a very well-featured sandbox for shipping applications. For personal fun and learning, I'm making a complete 2D video game in ideally less than 1MB. It has 60fps graphics, full spatial audio, and gamepad support, all because the browser has a lot of these APIs that didn't exist when I was starting out my career.…

> I personally _love_ how the browser is becoming a very well-featured sandbox for shipping applications. Same. My latest project is a waveform generator for wavetable synthesizers [1]; there are visualizations, as well as handling audio (not real time but still). I was surprised that I could build that as a web app and achieve good UX and performance. [1]: https://merely.xyz/waves

You’re down. I want to see your site! When can I see it?

And your domain is really cool too. I presume it’s like a self deprecating math joke.

Post reply on HN