Live data from Hacker News

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

austingil.com

61–70 of 240 posts

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

#61

Earlier quoted context omitted.

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.

I had a typo in url (wrote .xys instead of .xyz, fixed now), thanks for letting me know. The .xyz pun was not intended, but it does make a lot of sense for a math related app. Thanks for spotting that too!

Cool! some early feedback:

- Very hard for me to find the play button.. took like 10s of looking. I looked at the segment buttons

- Accidentally, I got some really cool sounds by mashing the play button to overlay it. Not sure why it gets distorted if it should be playing the same waves. But it sounds cool

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

#62
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

Old enough to remember when the accelerometer didn't require permission to access.

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

#63

Hmm. I couldn't find an indication of whether this requires Secure Context (ie only works with HTTPS or localhost) ? Secure Context seems (coupled with the permission check) like it's an appropriate requirement here but I didn't see whether it's actually enforced, and obviously as an HTML attribute rather than say a Javascript API it might have been forgotten.

Secure context has never applied for form data and i see no reason why it would here.

If it's acceptable to send the picture as a file upload over http then i see no reason why it wouldn't be acceptable to send a webcam captured picture.

Why do you think it should or would?

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

#64

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

This is very cool, although I was just playing around with it and my cat cast me a filthy look and raced away at high speed. Your warning about playing the sounds is well given! :)

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

#65

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.…

If you make a manifest file and listen to the install event users can add your game to their home screen. Aka. PWA. Then you can listen to most keys! Works for chrome on desktop and all major mobile browsers. Safari don't have the install event and need to be "installed" manually

I have made a web editor that uses this. There is an example pwa app Https://webide se/

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

#66

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.…

Why would anyone want, or let, a webpage assume full control of their keyboard?

ssh terminal

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

#67
post #34

Would be good to replace the screenshot in the article with a live updating can i use widget: https://caniusewidgets.com/html-media-capture

This doesn't work at all without JavaScript. I much prefer the picture to a blank region.

Slightly tangent, but it seems like more services are no longer offering fallbacks. Twitter recently got rid of its tweet text fallback, and the caniusewidgets doesn't offer a png fallback (at first glance). https://github.com/badges/shields uses svg so you can do this without complaining about bandwidth too.

Would be funny to include this in an article about yet another privacy-breaking feature of web.

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

#69
post #62
post #35

Earlier quoted context omitted.

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

Old enough to remember when the accelerometer didn't require permission to access.

Yeah you could use the vibration API and accelerometer API as a very low bitrate TX/RX system for devices on the same table and close enough.

No permissions required.

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

#70
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?

There is nothing wrong with HTML evolving, the problem is that it has evolved in the completely wrong direction. HTML should be a document language, yet it has barely improved in that in the last 20 years and is still missing really basic features (e.g. long-form document support). Instead it can talk to my Bluetooth devices and my camera. Something went very wrong in the evolution of HTML.

It's nice that we have a portable app platform now, but I really wish that would be a separate thing from the document centric Web, which slowly but surely is getting killed and replaced by a bunch of always-online apps.

Post reply on HN