8 ms·
A Silly Usecase for WebSockets (strobe warning)
- wglb 5y agoPerhaps we shouldn't post something that will cause harm to some people?
- quintussss 5y agoI made this to learn more about websockets and because a friend thought it would be funny for some reason. Let me know what you think.
- yetihehe 5y agoFor some reason it is.
- reustle 5y agoCool project. You may want to include an epilepsy warning to this. I don't suffer from it, but it definitely messed with my vision a bit.
- quintussss 5y agoYes absolutely, this was not an issue when it was just me and some friends using it.
- JKCalhoun 5y agoThrew together a couple PNG files. They look good against a 50% gray background. Perhaps a lighter gray for light_on, a darker gray light_off. Not as hard on the eyes. https://imgur.com/m2uznrc https://imgur.com/m2uznrc https://imgur.com/wSphM0b https://imgur.com/wSphM0b
- ASalazarMX 5y agoI much prefer the original eye-watering version. The friendly colors stray from the spirit of an annoying prank.
- drenvuk 5y agoStrobe warning in case someone might be susceptible to it. You got a chuckle out of me.
- hatch_q 5y agoHypothetically if someone suffers a seizure... who is responsible? The platform provider or users who switched the light on and off?
- bhawks 5y agoThe webbrowser that render it.
- Gigachad 5y agoThe manufacturer of the LCD that displayed it.
- chrisshroba 5y agoThomas Edison for inventing togglable lights.
- BostonFern 5y agoHow about the individual who assumed the risk of visiting a strobing web page?
- bandie91 5y agothose who made the web stadards capable of doing _anything_ with the user's computing environment, let it be any useless/arbitrary, and those who forced this arbitrary code execution platform to be the same as the information browsing / catalogue system / document viewer platform what the web originally meant to be. today users can not manage their bank account, enlist to classes, read newspapers online without the real fear of mining bitcoin for someone involuntarely, DDoS-ing goverment sites by hidden pixels, presenting unsolicited unrelated content to his audience on a presentation, and now, having sight damage...
- bandie91 5y agoEPILEPSY WARNING
- andreareina 5y agolamp:51 Uncaught DOMException: An attempt was made to use an object that is not, or is no longer, usable FF97 on Ubuntu ETA: I see it working now
- LinAGKar 5y agoStill broken. I think it's because it's overloaded and the websocket fails to connect, I'm getting a 504 Gateway Time-out.
- niel 5y agoEPILEPSY WARNING. Extreme strobe upon opening OP link. while (true) { websocket.send(JSON.stringify({ action: 'plus' })); } Really messed with my vision and crashed chrome. Fun experiment!
- bandamo 5y agono crash with: setInterval(() => { websocket.send(JSON.stringify({ action: 'plus' })); }, 0)
- heleninboodler 5y agosetInterval( () => { if(state.textContent == 'on') { websocket.send(JSON.stringify({ action: 'plus' })); } }, 50)
- deleted 5y ago[deleted]
- wisdom_py 5y agolol cool
- s3an 5y ago
- napolux 5y agoTHIS IS REALLY TRIGGERING. BE WARNED EPILEPSY WARNING
- nigywigy 5y agoCan everyone leave the light on for just a second, please? This is pretty fun haha
- cududa 5y agoI appreciate the strobe warning! Not gonna open it so I have no idea what it is but congrats on whatever it is. Anyway have an up vote for the strobe warning
- roveo 5y agoIt is a page with a schematic depiction of a floor lamp. "Click anywhere to turn the light on/off" is written below. When you click, the light turns on or off depending on the previous state, and background color changes accordingly between dark and light. The on/off state is the same for all visitors of the page, so, since this is on the front page of HN, it flickers quickly. Hence the strobe warning.
- Etheryte 5y agoIt's a webpage with a simple picture of a lamp and the text "40 people in the room, click anywhere to turn the light on/off". The page background alters between dark gray and white depending on whether the light is off and on. It's essentially a collective online light flickering exercise and it's about as strobe as you imagine that would be.
- Dylan16807 5y agoThough if you have a browser in dark mode it might only flicker between dark gray and slightly less dark gray.
- sodimel 5y agoHere's a (static, that don't flash) screenshot: https://up.l3m.in/file/1645698692.png https://up.l3m.in/file/1645698692.png edit: and here's a (very slow, 2s transition) gif of what it renders to: https://up.l3m.in/file/1645698812-slow-strobe.gif https://up.l3m.in/file/1645698812-slow-strobe.gif
- ASalazarMX 5y agoCuriosity is such a wonderful trait.
- 5y ago
- festive-minsky 5y agoReminds me of 'Someone keeps stealing my letters'
- hun3 5y ago"Blockchain will help mitigate the strobe issue" /s
- danuker 5y agoIt will only flicker once every 10 minutes, and the toggler will be the one winning the auction with the highest transaction fee.
- ummwhat 5y agoEveryone shut up a minute I'm trying to flicker some Morse code.
- 0xedb 5y agoSAVE YOUR EYES, a bit: body.style.transition = `background-color 0.9s ease 0.1s`
- noduerme 5y agoAlso, we live in a messed up world that one person can do something so stupid and get a thousand people to look at it.
- jaywalk 5y agoThere's nothing stupid about this. It's fun.
- dspillett 5y agoWe've lived in that world for at least a couple of decades, if limiting to “any one person”. Heck, a thousand is a rookie number: look at all the crap on youtube/tictok getting millions of views. If you stretch the definition to “any one person with some money” we've been in that world a lot longer.
- marcellus23 5y agoThat's a great thing. That's one of the least messed up things about the world.
- quintussss 5y agoGreat suggestion, thank you.
- deleted 5y ago[deleted]
- m00dy 5y agoTechno music is missing in the background
- Retr0id 5y agoPSA: Viewing strobing images has caused temporary (lasting hours) backlight issues on my 2021 Macbook Pro, in the past. Somehow, it causes the backlight to continue flickering for some time afterwards, even when looking at static images. It is barely perceptible, but quite noticeable at the edges of the screen - enough to be annoying. I have no idea if this is a hardware issue with my specific unit, or a more widespread thing.
- lysium 5y agoAre you sure it's your backlight and not your eyes? (Something like this: https://en.wikipedia.org/wiki/Motion_aftereffect https://en.wikipedia.org/wiki/Motion_aftereffect)
- danuker 5y agoOne way to be sure is to film it and analyze the pixels before and after a strobe test.
- Retr0id 5y agoI did this (well, I don't have any "before" footage, but I can assure you there was no flicker). Video here: https://twitter.com/David3141593/status/1456399950976278532 https://twitter.com/David3141593/status/1456399950976278532
- Retr0id 5y agoI caught the flickering on camera (see my other reply). Furthermore setting the display to 60fps (as opposed to 120Hz "ProMotion" VRR) made the flickering go away, and it would come back when I switched back to 120Hz.
- lewispollard 5y agoI've seen this on my phone's 120hz display too (S21 Ultra) and haven't yet determined the cause, but maybe it is related to strobing content. Will have to remember that the next time I notice it.
- SLWW 5y agoI love this. This is a fantastic use of websockets
- paull39 5y agoReally nice! Is reduced motion a good use case for this? https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...
- tonetheman 5y agoMight need more words on the page. Mine came up and it was a lamp and telling me to click with question marks. No indication of how or why this has anything to do with websockets. :( The lamp looks nice though.
- iampivot 5y agoHow about having an off switch on one side and an on switch on the other, then we can fight it out by seeing how many goes for each? Or, make in a flappy bird game? One up and one down button.
- bitslayer 5y agoThat's a good idea. Or you could have a grid of squares, with each person getting their own color when they click each one. Any of these ideas would work much better if you could prevent scripting of course.
- excitednumber 5y agoOP share source? I’m curious!
- helsinkiandrew 5y agoSource is viewable in the HTML: view-source:https://www.jakobmaier.at/projects/lamp/ https://www.jakobmaier.at/projects/lamp/
- rpaddock 5y agoThere is a company that is selling a LED Lamp that blinks at 40 Hz. They claim it can mitigate Alzheimer's. This line of devices has become known as 'Gamma Flashers', lots of knockoffs today. From Gamma brain wave state. There is some, small amount, of science to back this up. So who is going to be the first person to put up a 40 Hz flashing website? With appropriate warnings about Photosensitive Epilepsy before showing the page. https://pubmed.ncbi.nlm.nih.gov/30155285/ https://pubmed.ncbi.nlm.nih.gov/30155285/ https://www.verywellhealth.com/photosensitive-epilepsy-symptoms-causes-diagnosis-and-treatment-4686346 https://www.verywellhealth.com/photosensitive-epilepsy-sympt...
- Fnoord 5y agoDidn't the Dutch ISP Xs4all have this in past where you could remote control the lamps of a Christmas tree in their office? That's a long time ago, before WebSockets or IoT existed. And the server, while being absolutely hammered, kept up.
- noduerme 5y ago
- marcofiset 5y agoHow was "strobe warning" not enough warning for you? Just chill.
- noduerme 5y ago
- dang 5y agoYou've been breaking the site guidelines repeatedly lately. We ban accounts that do that. If you'd please review https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html and stick to the rules when posting here, we'd appreciate it. We've already had to ask you about this before.
- YoungWeb 5y agosetInterval(function(){ document.getElementsByClassName("bdy")[0].click();}, 10 )
- diimdeep 5y agoKeeping peace on planet Earth is like keeping this lamp ON all the time — bumpy road, one click at the time.
- deleted 5y ago[deleted]
- Orangeair 5y agoSeems to have been killed, there's just question marks everywhere there should be a dynamic value, and I can't interact with anything (Chrome for Android). > ? in the room, click anywhere to turn the light ? > click counter: ?
- Kalabint 5y agoIt's still running, with currently 393 Users and a total of 250000 Clicks. The organic User average seems to be around 50, so i think someone is trying to stress test the System.
- tjkrusinski 5y agoNot me in the console: `setInterval(() => {document.body.click()}, 20)`
- suifbwish 5y agoI want to make a version of this that controls my neighbors smart light bulbs.