Live data from Hacker News

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

austingil.com

161–170 of 240 posts

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

#161

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

You're absolutely correct. IMO, the reason is, to a large degree, ineptness of software engineers. It simply doesn't pay to hire or train high-quality SEs, if you're not google or Amazon (and even they probably only hire and pay the best to prevent competition). Instead, the industry as a whole hands out more "productive" tools, i.e., the abstraction layers you mentioned, in order to build ever more trivial applicati…

I see so much growth & positivity, so much can-do-ism. Everyone's doing great things, but in particular the web has brought about a much higher access to systems that seem much safer for users, much more sandboxed, with better tools/extensions/navigability/accessibility/hackability, that have much more open source activity going on than native (which has been to huge benefit in so many ways: to productivity, to learning, to exploring, to having fun, to creating social cultures & groups).

> I think that we're in a downwards spiral at this point

I'm mainly writing a reply just to say: I have huge hope we're on an great upward ascent & have made things increasingly better.

> IMO, the reason is, to a large degree, ineptness of software engineers.

I sometimes encounter less than optimal code or solutions, but the amount of times that it matters is unbelievably little. Focusing on really good engineers making really excellent decisions is, not, to me, a critical issue in most places. I think there's a lot of value in just finding the budget to support open source engineers, in trying to support good community efforts, like Web Incubation specs, like Bytecode Alliance. Time & care, about doing good things for community, over time, is the incomparable advantage, is the prime requirement of turning acceptable/passable/maybe-a-little-defect-y code into something that really works well & serves & is/has-become enduring.

> Instead, the industry as a whole hands out more "productive" tools, i.e., the abstraction layers you mentioned,

I see so little harm to using the good, well embraced, ultra productive, mid-industrial toolset we've grown into. And I see so little benefit to trying to go any other way. We should respect resource consumption, and some apps (webapp and native both) do bad jobs, but the layers mentioned seem like a vanish point of concern, far far far down where I think computing needs to be dwelling & caring & trying to do better. There's so few examples that there are real gains to be made from abandoning the layers we have; efforts like react-native show we can do basically the same high-production technioques at a native layer, but the rewards for doing it native have almost never materialized; just using the web stack continues to be good.

I think there are far more productive things to be debating & discussing, as we decide where to orient ourselves & the next steps of computing to. Worrying about these stacks has infected too much of the online discourse time spent, has become a mind-virus.

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

#162
post #95
post #78

Earlier quoted context omitted.

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). I'm not sure what features you mean. Most things I can think of for long form content are right there in HTML. Instead it can talk to my Bluetooth devices and my camera. Something went very wrong in the evolution of HTML. That's not HTML though. That…

> I'm not sure what features you mean. Most things I can think of for long form content are right there in HTML. If you publish a book as plain HTML scrolling becomes impossible, as any tiny movement will catapult you numerous pages forward. You can't bookmark a scroll position either and neither can you link it. If you split the document into multiple HTML files, you complete break the ability to search across the w…

> If you publish a book as plain HTML scrolling becomes impossible, as any tiny movement will catapult you numerous pages forward.

This isn't true on any popular browser or platform. Single-page scrolling using the keyboard, mouse, or touchscreen is built-in for all common browsers and scrolling even extremely large documents has been fine for at least a decade – unless you load it up with tons of JavaScript even in the ranges of thousands of pages will be at least as snappy as a PDF.

> You can't bookmark a scroll position either and neither can you link it.

You can't, and also wouldn't want to since that's inherently unstable (e.g. I resize the window slightly and all of the links break). What you can do is what people have been doing since around 1993 and put anchors on logical sections, paragraphs, etc. so you have a linkable stable anchor which doesn't depend on the window or font size.

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

#163
post #79

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

We're certainly veering off-topic, but I'd love to hear about which game engine you ended up using!

Because the entire point is to learn and not actually to ship a product, I wrote my own. The biggest libraries I use that I didn't write are HowlerJS for audio, PixiJS for graphics, and React for UI. The actual "game engine" is a very primitive one I wrote myself. You can see it here: https://github.com/ablakey/kestrel/blob/master/src/Engine.ts

One of the best things about NIH-ing my own engine is that I don't need to make it generic, meaning one less layer of abstraction to complicate implementation and debugging.

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

#164

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?

Me, because I want to see how much I can make a web browser video game feel like a native game.

Other than that... I'm not sure even I'd want to allow a webpage to do that.

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

#165
post #144

Earlier quoted context omitted.

> Then, Docker and containers (ship the whole OS with the application) 𝚃̶𝚘̶ ̶𝚋̶𝚎̶ ̶𝚏̶𝚊̶𝚒̶𝚛̶,̶ ̶𝚝̶𝚑̶𝚊̶𝚝̶'̶𝚜̶ ̶𝚜̶𝚑̶𝚒̶𝚙̶𝚙̶𝚒̶𝚗̶𝚐̶ ̶𝚝̶𝚑̶𝚎̶ ̶ ̶𝚔̶𝚎̶𝚛̶𝚗̶𝚎̶𝚕̶ ̶ ̶𝚊̶𝚗̶𝚍̶ ̶𝚗̶𝚎̶𝚎̶𝚍̶𝚎̶𝚍̶ ̶𝚙̶𝚊̶𝚌̶𝚔̶𝚊̶𝚐̶𝚎̶𝚜̶ ̶𝚠̶𝚒̶𝚝̶𝚑̶ ̶𝚝̶𝚑̶𝚎̶ ̶𝚊̶𝚙̶𝚙̶𝚕̶𝚒̶𝚌̶𝚊̶𝚝̶𝚒̶𝚘̶𝚗̶.̶ ̶ ̶𝚃̶𝚑̶𝚊̶𝚝̶'̶𝚜̶ ̶𝚙̶𝚎̶𝚍̶𝚊̶𝚗̶𝚝̶𝚒̶𝚌̶,̶ ̶𝙸̶ ̶𝚔̶𝚗̶𝚘̶𝚠̶,̶ ̶𝚊̶𝚗̶𝚍̶ ̶𝚠̶𝚑̶𝚒̶𝚕̶𝚎̶ ̶𝚠̶𝚑̶𝚊̶𝚝̶ ̶𝚢̶𝚘̶…

I thought docker used the host kernel with a different rootfs?

Apologies... I've been thinking in Docker For Mac Land. Yes, I think what you're saying is correct if you're running Docker on a Linux host.

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

#166
post #73

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

Are you using A-Frame? https://aframe.io/

Wow that's snazzy! But no, I'm using PixiJS because my game is 2D.

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

#167
post #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.

Yeah!

Any time I've tried to use WebGL... pain.

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

#168

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

Any chance you’re blogging about the process? I’d love to follow along, as I dream of doing the same thing one day.

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

#169

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

Any chance you’re blogging about the process? I’d love to follow along, as I dream of doing the same thing one day.

I really really should. I want to un-abandon my home page and maybe start writing about it there. FWIW the code is here: https://github.com/ablakey/kestrel

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

#170
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)

Yep, I do.
Post reply on HN