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
TIL: You can access a user’s camera with just HTML
141–150 of 240 posts
Re: TIL: You can access a user’s camera with just HTML
#142Earlier quoted context omitted.
Thanks for saying this, as I know a lot of people on HN have very negative feelings towards this trend. Personally, I feel the browser is a great way to stop reinventing the wheel, and the APIs abstract away a lot of the heavy lifting. They pretty much get you 80% of the way there, and the last 20% is where you can really add the stamp of "uniqueness" to your implementation. The fact that the browser is also heavily…
It just feels like every time software developers can't (or won't) build things cross-platform, users end up with bigger and bloatier solutions and poorer experiences. First, it was cross-platform UI toolkits and OS abstractions like Qt (require users to use a big, "lowest common denominator compromise" library ) Then, it was web apps (require users to provide a browser) Then, it was Electron and friends (ship the wh…
𝚃̶𝚘̶ ̶𝚋̶𝚎̶ ̶𝚏̶𝚊̶𝚒̶𝚛̶,̶ ̶𝚝̶𝚑̶𝚊̶𝚝̶'̶𝚜̶ ̶𝚜̶𝚑̶𝚒̶𝚙̶𝚙̶𝚒̶𝚗̶𝚐̶ ̶𝚝̶𝚑̶𝚎̶ ̶̶𝚔̶𝚎̶𝚛̶𝚗̶𝚎̶𝚕̶̶ ̶𝚊̶𝚗̶𝚍̶ ̶𝚗̶𝚎̶𝚎̶𝚍̶𝚎̶𝚍̶ ̶𝚙̶𝚊̶𝚌̶𝚔̶𝚊̶𝚐̶𝚎̶𝚜̶ ̶𝚠̶𝚒̶𝚝̶𝚑̶ ̶𝚝̶𝚑̶𝚎̶ ̶𝚊̶𝚙̶𝚙̶𝚕̶𝚒̶𝚌̶𝚊̶𝚝̶𝚒̶𝚘̶𝚗̶.̶ ̶ ̶𝚃̶𝚑̶𝚊̶𝚝̶'̶𝚜̶ ̶𝚙̶𝚎̶𝚍̶𝚊̶𝚗̶𝚝̶𝚒̶𝚌̶,̶ ̶𝙸̶ ̶𝚔̶𝚗̶𝚘̶𝚠̶,̶ ̶𝚊̶𝚗̶𝚍̶ ̶𝚠̶𝚑̶𝚒̶𝚕̶𝚎̶ ̶𝚠̶𝚑̶𝚊̶𝚝̶ ̶𝚢̶𝚘̶𝚞̶ ̶𝚜̶𝚊̶𝚒̶𝚍̶ ̶𝚒̶𝚜̶ ̶̶𝚝̶𝚎̶𝚌̶𝚑̶𝚗̶𝚒̶𝚌̶𝚊̶𝚕̶𝚕̶𝚢̶̶ ̶𝚝̶𝚛̶𝚞̶𝚎̶,̶ ̶𝚛̶𝚎̶𝚖̶𝚘̶𝚟̶𝚒̶𝚗̶𝚐̶ ̶𝚘̶𝚗̶𝚎̶ ̶𝚕̶𝚎̶𝚟̶𝚎̶𝚕̶ ̶𝚘̶𝚏̶ ̶𝚊̶𝚋̶𝚜̶𝚝̶𝚛̶𝚊̶𝚌̶𝚝̶𝚒̶𝚘̶𝚗̶ ̶𝚏̶𝚛̶𝚘̶𝚖̶ ̶𝚝̶𝚑̶𝚎̶ ̶𝚍̶𝚎̶𝚜̶𝚌̶𝚛̶𝚒̶𝚙̶𝚝̶𝚒̶𝚘̶𝚗̶ ̶𝚛̶𝚎̶𝚊̶𝚕̶𝚕̶𝚢̶ ̶𝚌̶𝚑̶𝚊̶𝚗̶𝚐̶𝚎̶𝚜̶ ̶𝚝̶𝚑̶𝚎̶ ̶𝚖̶𝚎̶𝚊̶𝚗̶𝚒̶𝚗̶𝚐̶ ̶𝚜̶𝚒̶𝚐̶𝚗̶𝚒̶𝚏̶𝚒̶𝚌̶𝚊̶𝚗̶𝚝̶𝚕̶𝚢̶.̶ ̶ ̶𝚃̶𝚑̶𝚎̶ ̶𝙻̶𝚒̶𝚗̶𝚞̶𝚡̶ ̶𝚔̶𝚎̶𝚛̶𝚗̶𝚎̶𝚕̶ ̶𝚘̶𝚗̶ ̶𝚒̶𝚝̶𝚜̶ ̶𝚘̶𝚠̶𝚗̶ ̶𝚒̶𝚜̶ ̶𝚜̶𝚘̶𝚖̶𝚎̶𝚝̶𝚑̶𝚒̶𝚗̶𝚐̶ ̶𝚕̶𝚒̶𝚔̶𝚎̶ ̶𝟷̶𝟶̶ ̶𝚖̶𝚎̶𝚐̶𝚊̶𝚋̶𝚢̶𝚝̶𝚎̶𝚜̶.̶
EDIT: What I've said is not exactly correct. If you're not running Docker on a Linux host, then you'll have a Linux kernel running in emulation but it's not shipping with containers. Not sure what I was thinking. I believe this is closer to the truth.
Re: TIL: You can access a user’s camera with just HTML
#143Earlier quoted context omitted.
My answer to this is that the calendar just does not need to be a web app. Weakening a primary advantage of everything else on the web just so that my calendar can be a web app seems like a poor trade-off. Re: sound, "Triggered as the result of a user action" is not a high enough bar.
Calendars are far more useful as web apps than other incarnations; you can open them anywhere and don't have to carry a specific artifact with you to do it.
Re: TIL: You can access a user’s camera with just HTML
#144Earlier quoted context omitted.
It just feels like every time software developers can't (or won't) build things cross-platform, users end up with bigger and bloatier solutions and poorer experiences. First, it was cross-platform UI toolkits and OS abstractions like Qt (require users to use a big, "lowest common denominator compromise" library ) Then, it was web apps (require users to provide a browser) Then, it was Electron and friends (ship the wh…
> Then, Docker and containers (ship the whole OS with the application) 𝚃̶𝚘̶ ̶𝚋̶𝚎̶ ̶𝚏̶𝚊̶𝚒̶𝚛̶,̶ ̶𝚝̶𝚑̶𝚊̶𝚝̶'̶𝚜̶ ̶𝚜̶𝚑̶𝚒̶𝚙̶𝚙̶𝚒̶𝚗̶𝚐̶ ̶𝚝̶𝚑̶𝚎̶ ̶ ̶𝚔̶𝚎̶𝚛̶𝚗̶𝚎̶𝚕̶ ̶ ̶𝚊̶𝚗̶𝚍̶ ̶𝚗̶𝚎̶𝚎̶𝚍̶𝚎̶𝚍̶ ̶𝚙̶𝚊̶𝚌̶𝚔̶𝚊̶𝚐̶𝚎̶𝚜̶ ̶𝚠̶𝚒̶𝚝̶𝚑̶ ̶𝚝̶𝚑̶𝚎̶ ̶𝚊̶𝚙̶𝚙̶𝚕̶𝚒̶𝚌̶𝚊̶𝚝̶𝚒̶𝚘̶𝚗̶.̶ ̶ ̶𝚃̶𝚑̶𝚊̶𝚝̶'̶𝚜̶ ̶𝚙̶𝚎̶𝚍̶𝚊̶𝚗̶𝚝̶𝚒̶𝚌̶,̶ ̶𝙸̶ ̶𝚔̶𝚗̶𝚘̶𝚠̶,̶ ̶𝚊̶𝚗̶𝚍̶ ̶𝚠̶𝚑̶𝚒̶𝚕̶𝚎̶ ̶𝚠̶𝚑̶𝚊̶𝚝̶ ̶𝚢̶𝚘̶…
Re: TIL: You can access a user’s camera with just HTML
#145This 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 blank screen on Firefox for Android :(
Re: TIL: You can access a user’s camera with just HTML
#146Earlier quoted context omitted.
It just feels like every time software developers can't (or won't) build things cross-platform, users end up with bigger and bloatier solutions and poorer experiences. First, it was cross-platform UI toolkits and OS abstractions like Qt (require users to use a big, "lowest common denominator compromise" library ) Then, it was web apps (require users to provide a browser) Then, it was Electron and friends (ship the wh…
> Then, Docker and containers (ship the whole OS with the application) 𝚃̶𝚘̶ ̶𝚋̶𝚎̶ ̶𝚏̶𝚊̶𝚒̶𝚛̶,̶ ̶𝚝̶𝚑̶𝚊̶𝚝̶'̶𝚜̶ ̶𝚜̶𝚑̶𝚒̶𝚙̶𝚙̶𝚒̶𝚗̶𝚐̶ ̶𝚝̶𝚑̶𝚎̶ ̶ ̶𝚔̶𝚎̶𝚛̶𝚗̶𝚎̶𝚕̶ ̶ ̶𝚊̶𝚗̶𝚍̶ ̶𝚗̶𝚎̶𝚎̶𝚍̶𝚎̶𝚍̶ ̶𝚙̶𝚊̶𝚌̶𝚔̶𝚊̶𝚐̶𝚎̶𝚜̶ ̶𝚠̶𝚒̶𝚝̶𝚑̶ ̶𝚝̶𝚑̶𝚎̶ ̶𝚊̶𝚙̶𝚙̶𝚕̶𝚒̶𝚌̶𝚊̶𝚝̶𝚒̶𝚘̶𝚗̶.̶ ̶ ̶𝚃̶𝚑̶𝚊̶𝚝̶'̶𝚜̶ ̶𝚙̶𝚎̶𝚍̶𝚊̶𝚗̶𝚝̶𝚒̶𝚌̶,̶ ̶𝙸̶ ̶𝚔̶𝚗̶𝚘̶𝚠̶,̶ ̶𝚊̶𝚗̶𝚍̶ ̶𝚠̶𝚑̶𝚒̶𝚕̶𝚎̶ ̶𝚠̶𝚑̶𝚊̶𝚝̶ ̶𝚢̶𝚘̶…
Re: TIL: You can access a user’s camera with just HTML
#147A 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
#148Earlier 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.
Re: TIL: You can access a user’s camera with just HTML
#149Earlier 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
USB/Bluetooth is underrated because it means you can ship hardware products that can have their firmware updated or connect and sync with a web service without having to build/ship/maintain a whole app for it that will eventually stop working after an OS update.
I had issues as recent as last year's new products.
But otherwise I love the concept of hardware access with HTML. The embedded guy in me thinks the future is going to be crazy. I can't quite wrap my head around the possibilities.
Re: TIL: You can access a user’s camera with just HTML
#150Earlier quoted context omitted.
Note that this uses the JavaScript MediaDevices API to stream the camera, which is different from OP's link (which is a file picker input that launches the mobile camera instead of going to the photo gallery)
However, ‘filter: invert(1)’ on top of the OP’s approach should do the same. https://developer.mozilla.org/en-US/docs/Web/CSS/filter-func...