Live data from Hacker News

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

austingil.com

31–40 of 240 posts

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

#31
post #9

This is a site that shows the camera feed full screen and inverts in with css https://nega.radioac.dev/ I hacked it together in half an hour to give people a way to look at the uninverted version of my inverted analogue photos with their phones at exhibitions. most people were more excited to play with it on their phone than by the photos I took days making. :'( [edit oops this javascript ]

I'm getting a cert error. Subject is *.fortinet.com, not nega.radioac.dev. Edit, the second: Disregard. It's definitely a corporate middlebox on my end.

My guess is that some corporate filter blocked it because of the "nega" subdomain. Kind of sounds like the racial slur.

Edit: it doesn't help that the domain is `radioac.dev`. So *NEGA.R*adioc.dev

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

#32
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 do, but only the front facing camera though pointing at my face.

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

#33

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

>because browsers really don't want you to own _every_ key.

Wouldn't be really a sandbox anymore if they could

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

#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

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

#36

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.

MDN [1] does not list the Screen Capture API, so presumably the capture HTML element is not included either.

[1] https://developer.mozilla.org/en-US/docs/Web/Security/Secure...

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

#38

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?

You might as well ask why is HTML able to access files for file form uploads.

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

#39

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?

Path of least resistance. The same reason every single new network service has to be tunneled through a stateless client-server text protocol on a single tcp port. Doing anything less hacky would require more work/money/cooperation. Foundations are expensive, scaffolding is cheap.

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

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

Any former geocities member us surely aware of the MIDI capability!
Post reply on HN