News for hackers. Stuff that matters.
Re:You click a link to a news site, to read an article that ... by rstat1 on Sunday December 05, 2021 @07:28PM (#29454804)
I'd say the worst part is that Firefox has a feature for blocking auto playing video. But it never works.
Re:You click a link to a news site, to read an article that ... by grishka on Sunday December 05, 2021 @10:47PM (#29455904)
I don't understand why there isn't a browser feature that would simply disable all and any support for <video> and <audio> elements, or ask you a permission before a website can create any. It's really that simple. No need to try, and fail, to figure out which videos are "safe" to autoplay and which aren't. Let the user decide.
Re:You click a link to a news site, to read an article that ... by onion2k on Monday December 06, 2021 @12:22AM (#29456459)
I've seen sites that autoplay video by implementing a JS h264 decoder that renders to a <canvas> element. Developers will go to significant lengths to work around browser permissions.
Re:You click a link to a news site, to read an article that ... by grishka on Monday December 06, 2021 @12:58AM (#29456642)
That's... actually viable? You can decode h264 in real time in JS with a single thread that also runs the UI?!

Sometimes I have this crazy thought that we maybe, just maybe, should undo all the JS performance optimizations in browsers. So JS again becomes the macro language for hypertext documents it's meant to be, not an "application platform".

Re:You click a link to a news site, to read an article that ... by tux3 on Monday December 06, 2021 @03:50AM (#29457621)
Oh, there's worse. Some video chat apps encode in software. The magical browser APIs don't always give you enough control to do what you want with the video stream, so they just output the video stream into a hidden canvas, screenshot the canvas 20 times a second, and throw the frames at ffmpeg.js ...
Re:You click a link to a news site, to read an article that ... by zrm on Monday December 06, 2021 @01:11AM (#29456726)
Or just have browsers disable javascript by default and require explicit permission to use it.

90+% of web pages shouldn't need it for anything.

Re:You click a link to a news site, to read an article that ... by wruza on Monday December 06, 2021 @01:58AM (#29456980)
Or make a dead-slow subset that doesn’t eat cpu cycles, but schedules 10-20 ops every 1ms. And then enable full-speed if the user asks. Ads guys would then resurrect a demoscene spirit out of it. Ah, dreams.
Re:You click a link to a news site, to read an article that ... by onion2k on Monday December 06, 2021 @03:15AM (#29457413)
I'd be a lot more in favour of ads if they had more copper effects and shadebobs.
Re:You click a link to a news site, to read an article that ... by onion2k on Monday December 06, 2021 @02:11AM (#29457057)
That's... actually viable?

Developers who do things like that probably aren't checking whether their code works well on any machines besides their own.

Re:You click a link to a news site, to read an article that ... by pjmlp on Monday December 06, 2021 @01:36AM (#29456867)
Easy, install Edge.

https://therecord.media/microsoft-silently-enables-super-dup...

Although I guess this isn't the answer you're looking for.

Re:You click a link to a news site, to read an article that ... by olyjohn on Monday December 06, 2021 @07:01PM (#29467481)
lol. This reminds me of IE's "Enhanced Security Mode" where they disabled pretty much everything in the browser. This was pre-configured on Windows Server (probably still is). The browser is pretty much useless in this state, so the only way to get what you needed from a browser was to make it "unsafe." Too unsafe for servers with experienced tech people using them, but just fine for the general public on a desktop.
Re:You click a link to a news site, to read an article that ... by hiccuphippo on Sunday December 05, 2021 @11:43PM (#29456243)
Makes me miss the days of Flash because I could block everything video, audio and animation related with FlashBlock.
Re:You click a link to a news site, to read an article that ... by pabs3 on Monday December 06, 2021 @01:31AM (#29456837)
uMatrix can do that, but it is unmaintained. uBlock Origin uses the same engine as it and probably can do that too.
Re:You click a link to a news site, to read an article that ... by gruez on Sunday December 05, 2021 @07:56PM (#29454982)
I suspect that's because you can programmatically start video playback from within event handlers. That's necessary because otherwise any site that use custom playback controls will break. However, that also means malicious sites can implement "autoplay" by adding a onmousedown/onscroll/touchstart event handler and starting playback from there. Video playback will start the moment you try to interact with the page in any way.
Re:You click a link to a news site, to read an article that ... by boring_twenties on Sunday December 05, 2021 @10:20PM (#29455762)
> any site that use custom playback controls will break

Is that actually a bad thing?

I have no idea about video playback controls, but in every other instance I've noticed where sites implement their own custom versions of browser controls, it's been absolutely terrible.

Custom scrollbars, or lack thereof. Custom drop-down lists, which never support keyboard input properly. And so on.

And even if I'm wrong, and custom video playback controls are somehow desirable, why should they be supported for any event except onclick?

Re:You click a link to a news site, to read an article that ... by gruez on Sunday December 05, 2021 @10:31PM (#29455818)
>why should they be supported for any event except onclick?

obvious example would be articles with scrolling effects (eg. https://www.newyorker.com/magazine/2021/12/06/the-secretive-...), and need to autoplay videos when they scroll into view. That said, even if you restricted it to onclick, I don't imagine it's too hard for a page to receive a stray click (eg. if you're randomly selecting stuff) to trigger playback.

Re:You click a link to a news site, to read an article that ... by drdeca on Monday December 06, 2021 @12:04AM (#29456359)
Why, as a user, would I want a page to begin playing a video as a result of scrolling?
Re:You click a link to a news site, to read an article that ... by inetknght on Sunday December 05, 2021 @10:37PM (#29455843)
> articles with scrolling effects

That is not a legitimate example of a good thing. That's a legitimate example of something that shouldn't be a thing

Re:You click a link to a news site, to read an article that ... by sdoering on Monday December 06, 2021 @01:32AM (#29456841)
In your opinion. Being someone who hates these autoplay videos on news sites I can also see that examples like OP's are a valid and when done well interesting new firm of story telling.

It is imho very valid to experiment with new forms of multimedia mixed stories.

And just because some people abuse features that enable this we should not try to stifle innovative ideas as a whole imho.

I just don't use sites that do this anymore. I mean the abusal part.

Re:You click a link to a news site, to read an article that ... by Firadeoclus on Monday December 06, 2021 @10:49AM (#29461164)
That seems solvable, for example by blocking programmatic control of playback until you allow it for a given video element. That way it only "breaks" when the user wants it to be "broken".
Re:You click a link to a news site, to read an article that ... by jeroenhd on Sunday December 05, 2021 @10:03PM (#29455690)
With some ad blocking I can at least get the videos to stop playing. The black rectangles are only slightly less annoying, though.