News for hackers. Stuff that matters.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by the8472 on Sunday November 13, 2016 @05:37AM (#12942728)
firefox -> about:config -> media.autoplay.enabled = false

additionally the dom.audiochannel.mutedByDefault and media.default_volume settings may also be useful if you want slightly different behavior.

If you want a more blunt tool you can also use content blockers to block media content until you opt into it for a particular site.

> I know there are plugins than can somewhat do this, but no solutions are universal or great.

How so? There are about a dozen FF addons covering different use-cases like muting inactive tabs or all tabs but a designated one. If none of them meet your particular expectations that might also indicate that everyone wants something different and it is difficult for browser vendors to cover all expectations. Maybe you should modify an existing addon instead to do what you want.

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by fungi on Sunday November 13, 2016 @06:18AM (#12942834)
breaks vimeo and twiter vids. need firefox addon with button to toggle the setting.

https://addons.mozilla.org/en-US/firefox/addon/autoplay-togg...

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by whyoh on Sunday November 13, 2016 @01:14PM (#12944664)
>firefox -> about:config -> media.autoplay.enabled = false

That doesn't always work. Some videos don't play at all (even when clicked) and some others play automatically anyway (rare, but it happens).

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by rch on Sunday November 13, 2016 @10:29AM (#12943767)
The good thing about setting browser defaults is that people producing these offending sites eventually give up and change their behavior.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by ynak on Sunday November 13, 2016 @08:37AM (#12943244)
I'm taking a more drastic way; turning media.{mp4, webm, ...}.enabled into False never let YouTube and other media autoplay(even play nomally) without any addons. When I want to watch videos, download them by youtube-dl and watch locally.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by Exuma on Sunday November 13, 2016 @09:04AM (#12943348)
You download YT videos before watching them? Seriously? Sometimes the suggestions on HN are literally insane in the amount of effort people go through to avoid things that wouldn't be a problem in the first place if you did something simple like use adblock software.

I saw some other post where a guy hand edits tens of thousands of entries in his hosts file... yeah dude what an amazing use of time.

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by morganvachon on Sunday November 13, 2016 @10:05AM (#12943613)
Watching later with youtube-dl is actually the recommended way to do YouTube on OpenBSD; various "OpenBSD as a desktop OS" tutorials mention it, and in practice it works very well. On that particular OS it is due to the lack of a native Flash plugin, but even with YouTube offering most of their videos via HTML5 it actually makes for a better experience to download and then view them. I'd imagine it could even be automated trivially, by calling youtube-dl via a browser plugin, or by writing a script to pass YouTube URLs to with a simple GUI thrown together in FLTK or TCL/TK.

As for the hosts file, a hand-edited file works great, and you don't have to do thousands of entries on your own. You can find some great examples all over the web, then tune them to your own needs, saving a lot of time. For example, there are at least two out there for Windows 10 users to block all communication with Microsoft's servers, avoiding any telemetry and tracking by the OS. If your router is smart enough, you can even upload your hosts file to it to block any device on your network from getting ads and being tracked.

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by kalden_ on Tuesday November 15, 2016 @05:48AM (#12957032)
> actually makes for a better experience to download and then view them.

Can you specify how? I was doing this when I didn't have enough RAM for the Youtube player with latest Firefox and it's not what I personally felt. The current player has size options (larger or full-screen), annotations and comments can be disabled (e.g. with Adblock lists). In the end it's always having the video canvas in front of your eyes. Maybe integration with a tiling WM?

> I'd imagine it could even be automated trivially, by calling youtube-dl via a browser plugin, or by writing a script to pass YouTube URLs to with a simple GUI thrown together in FLTK or TCL/TK.

Existing means for VLC integration aren't that bad either.

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by morganvachon on Wednesday November 16, 2016 @03:22PM (#12971091)
> Can you specify how?

For me it was because Firefox on OpenBSD, even on a modern, fast system (quad core AMD64 with 8GB RAM), is so slow and stuttery with any streaming video it was too painful. Using youtube-dl and playing it via mplayer worked much better, and you can customize mplayer's controls to mimic YouTube's if you like (though I never bothered).

VLC is another great option, it's designed for streaming so yes that would be a great alternative. I personally don't use VLC on non-Windows OSes except on Haiku.

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by goodplay on Sunday November 13, 2016 @09:23AM (#12943413)
I've used to employ a similar work flow to GP until a few years ago when video support finally got acceptable in web browsers. I still download talks rather than watch them on youtube or if I want to insure the future availability of the video.

If the current web works well for you then great, but it would be naive to think that it fits everyone's use case (Even more so to label what they need to do as "insane").

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by the8472 on Sunday November 13, 2016 @10:10AM (#12943653)
there are browser addons that directly pass the current site's URL to mpv, which in turn uses youtube-dl to fetch the contents. so it's pretty much 1-click playback.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by minitech on Sunday November 13, 2016 @01:41PM (#12944832)
> You download YT videos before watching them? Seriously?

I do this because the YouTube website (when the player is present) is too slow for my device. It adds about 5 seconds, nothing terrible.

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by tastythrowaway2 on Sunday November 13, 2016 @09:46AM (#12943508)
the change to the hosts file is actually a really good idea. it is reliable and doesn't trip up ad blocking detectors. perhaps its greatest benefit is that it's a change that only has to happen once and everyone else who also wants to can benefit from it [0]. so your assertion is valid, even though it was sarcastic, that it is an amazing use of one's time.

[0] https://github.com/StevenBlack/hosts

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by xrisk on Sunday November 13, 2016 @09:17AM (#12943394)
Link to the guy who does this?
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by fgandiya on Sunday November 13, 2016 @02:07PM (#12944980)
It might be this one from another comment

https://github.com/StevenBlack/hosts

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by noir_lord on Sunday November 13, 2016 @11:46AM (#12944169)

    #!/bin/bash
    url=`xsel`
    notify-send "Downloading - $url"
    youtube-dl -o - "$url" -f 43 | mplayer -
Whatever is in your default xsel buffer gets streamed to mplayer, if you bind it a keyboard shortcut (I use alt+shift+y (for Youtube)).

Makes life a lot more convenient :)

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by qtk on Sunday November 13, 2016 @09:03AM (#12943343)
Why would you want that?
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by goodplay on Sunday November 13, 2016 @09:13AM (#12943381)
One good reason for me personally is to insure future availability. As I type this, there are a couple of videos in my watch-later playlist that have been replaced with "video removed".
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by muntoo on Sunday November 13, 2016 @09:17AM (#12943388)
My Watch Later is like 100 videos long. Ain't nobody got time for that.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by jerf on Sunday November 13, 2016 @10:21AM (#12943714)
youtube-dl can download lists of videos.

It also automatically doesn't download things you already have, so it can be used periodically to sync the list if you want.

It only really matters if you expect videos to go down, but I also have my small collection of "videos that were obviously going to be taken down".

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by dawnerd on Sunday November 13, 2016 @02:29PM (#12945119)
This is one of the best features (apart from channel backups).

I think because of its name people also don't realize that youtube-dl works for LOTS of other sites and it's relatively easy to add new sites in as well.

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by morganvachon on Sunday November 13, 2016 @10:06AM (#12943623)
You're posting on HN, I would think you would find a way to automate it. ;-)
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by goodplay on Sunday November 13, 2016 @10:22AM (#12943727)
I believe youtube-dl is capable of downloading entire lists, but I don't know if the watch-later list behaves as a normal list. One way to find out.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by ReFruity on Sunday November 13, 2016 @09:08AM (#12943359)
I use butterflies to watch videos http://xkcd.com/378/
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by petre on Sunday November 13, 2016 @05:47AM (#12942752)
Did that buy youtube is still on autoplay.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by pjc50 on Sunday November 13, 2016 @06:19AM (#12942836)
Y'know, youtube is one of the few sites where people actually want autoplay to work.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by julenx on Sunday November 13, 2016 @07:21AM (#12942991)
When you visit a video explicitly, yes. But when you jump into a specific channel you don't want a default video auto-playing all the time, which is pretty annoying.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by anc84 on Sunday November 13, 2016 @07:30AM (#12943026)
Blame Youtube for that horrible feature, not the browser.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by Whitestrake on Sunday November 13, 2016 @07:41AM (#12943062)
Nobody claimed it was anyone else's fault, that's already well established. The entire premise of this thread is to discuss OP's plea for browsers to actually fix the problem.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by johnnydoebk on Sunday November 13, 2016 @09:07AM (#12943357)
>> youtube is one of the few sites where people actually want autoplay

Not me. I usually open a few tabs at the same time and have to stop every video manually. That's pretty annoying. I wish it didn't have autoplay.

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by ben_bai on Sunday November 13, 2016 @10:55AM (#12943897)
Chromium is the Browser you want. You can load a bunch of tabs an it only starts autoplay when you finally switch to the tab you want to watch.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by gkya on Sunday November 13, 2016 @05:57PM (#12946235)
Best viewed with IE (tm), revisited.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by sesqu on Sunday November 13, 2016 @03:05PM (#12945321)
The YouTube Plus add-on has an option to turn off YT autoplay, as well as a number of other quality-of-life things.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by baddox on Sunday November 13, 2016 @10:54AM (#12943888)
YouTube doesn't start playing a video until you focus the tab.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by johnnydoebk on Sunday November 13, 2016 @11:37AM (#12944120)
That's not true for all browsers.

As @ben_bai pointed out above it works that way on Chromium.

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by kevincox on Sunday November 13, 2016 @06:57AM (#12942934)
Yeah, if I know I'm going to a YT link I'm prepared for it. Unfortunately with the rise of URL shorteners I often don't know I'm going to a video site so I'm still undecided about whether I want the video to autoplay or not.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by out_of_protocol on Sunday November 13, 2016 @07:57AM (#12943110)
Not me for sure. Autoplay-after-autoplay makes it even more hilarious
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by nommm-nommm on Sunday November 13, 2016 @07:33AM (#12943035)
I never want youtube to Autoplay.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by ivank on Sunday November 13, 2016 @05:52AM (#12942762)
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by the8472 on Sunday November 13, 2016 @06:00AM (#12942787)
I just tried it on nightly and it worksforme(tm).
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by duaneb on Sunday November 13, 2016 @04:13PM (#12945698)
> firefox -> about:config -> media.autoplay.enabled = false

Unfortunately, this isn't available for devices with a monopolized browser. (iOS)

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by skrowl on Sunday November 13, 2016 @05:09PM (#12945964)
I can't tell you how many iOS users are tricked by "Oh, I can get Chrome and Firefox on iOS" that don't realize it's just skinned webkit. Totally dishonest.
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by BoorishBears on Sunday November 13, 2016 @05:47PM (#12946172)
I'm actually impressed that Chrome on iOS manages to be less stable than Safari since it's using the same engine...
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by beambot on Sunday November 13, 2016 @04:34PM (#12945805)
So make another Ask HN post: "Dear Google, Apple, Mozilla, and MS: Please End Monopolized Browsers for our devices"
Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by vurpo on Monday November 14, 2016 @08:32PM (#12954905)
It would be more like "Dear Apple: Please End Monopolized Browsers for our devices"

Google's and MS's operating systems don't monopolize the browser. I'm not sure if Mozilla is even making an OS anymore. The only OS in this day and age which doesn't let you implement your own browser engine is iOS.

Re:Dear Google, Apple, Mozilla, and MS: Please End Auto-Play... by duaneb on Monday November 14, 2016 @03:12PM (#12952877)
That wouldn't contribute anything to the conversation.