Hacker News new | ask | show | jobs
by lukepothier 3213 days ago
If it's true that Chrome on Oreo genuinely prevents picture-in-picture for YouTube specifically, that's a troubling precedent to set. Why not allow all websites to enable/disable PiP (maybe via a meta tag, in the way that tab theme colours already work)? If I query https://m.youtube.com while emulating a Nexus 5X, the response contains:

  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, target-densityDpi=medium-dpi">
Is that what is preventing PiP on YouTube or is it some sort of underhanded inter-Google arrangement between Chrome and YouTube?
4 comments

Shared below too.

Just as a quick point and I will drop it in the article comments too. I'm the lead for our Chrome Developer Relations team.

Chrome doesn't disable picture in picture for Youtube, Youtube disable it in Chrome. They listen to resize events iirc and then exit fullscreen mode (the only way to currently get to pip mode in Chrome).

That's interesting, and a relief.
If you are interested, there is also a spec under development at the moment to make it more explicit - https://wicg.github.io/picture-in-picture/
Then Chrome should have an option to stop the resize handler from firing when entering PiP mode. The user should always have the right to override what the website is doing.
So you would like us to not tell the page what the render is doing? I'm not sure how that would play out for any number of API's that exist on the web. Developer's have consistently had the means to override the default actions of the browser (think drag and drop) but I don't think hiding side-effects or user actions helps anyone.
I'd like to be able to tell my browser what it should tell the pages it's loading, especially if pages are leveraging it to do things against my will.

That applies to blocking Google ads, as well as fixing Youtube malfeatures.

Of course, it's understandable you won't see this from a browser paid for by Google. But you can't paint in broad brush strokes like "I don't think hiding side-effects or user actions helps anyone."

I'm disputing the fact there was a casual offhand design, and I don't think hiding the state of the render or the browser helps anyone not least developers who need the information about the state of their page.

I'm not saying that there can't be meaningful response from the browser to user hostile actions, I don't think anyone disagrees.

There's a broader question about a user's will and the sites intent especially when it comes to business plans of the site that I'm not sure if access to features native in the browser is aligned with say ad blocking or tracking etc... I don't know.

> There's a broader question about a user's will and the sites intent especially when it comes to business plans of the site

The site's business plans are not my problem. Basically, my phone and my computer should do what I want. Why is there even an API to make a video player enter/exit full-screen mode ? That's 100% a user decision and there is no valid reason why that should ever be exposed to JS.

Thank you for staying level-headed here. This is indeed a gray area question, and it's worth having a debate over. No one is clearly in the right.
> I don't think hiding the state of the render or the browser helps anyone not least developers who need the information about the state of their page.

I don't care about helping developers who want to hinder my usage of my browser on my hardware. It's my CPU they are executing on, and thus it should be I & I alone who determines what is executed.

Actually, yes. I want that the user is able to force a page to do whatever the user wants, if they choose to do so.

Just like my browser blocks popups, and my browser blocks those sites that try to prevent right-click, and my browser blocks those sites that spawn dialogs when you try to leave them, Just in the same way I want my browser to force websites to allow PiP.

I agree with you, but that is probably something that belongs to a plugin.
Which Chrome for Android does not support.
That would be an excellent way to force Google to switch distribution of all content via YouTube to HTML5 EME with Widevine DRM, given it's pretty clear their music agreements prohibit permitting this.
Most of YouTube content isn't music though. Why are they so user hostile - e.g. why can't I listen to talks/podcasters in the background while browsing the internet?
Try Firefox for Android - it allows background nedia streaming, and even puts controls in the notification drawer. It also allows adblocking, extensions, has the amazing reader mode which makes the most unusable websites readable again.

The current version 55 is a little slower than Chrome on my 3 year old phone, but performance in the past few major versions has definitely improved. The nighty developer build of Firefox 57 absolutely flies.

Mozilla is doing an amazing job with their Firefox modernization, it's a shame how little attention it gets on Android.

Another reason to use Firefox is to resist the monoculture of just one dominating browser, that's also made by the same company that makes the most common mobile OS and a lot of dominating web services, like Youtube. Allo for the web still only works in Chrome, because Google know they can get away with it.
Nice suggestion, but note that, since Google started abusing the page visibility API for their scummy ends, using Firefox is not enough by itself in order to play YouTube media in background. To restore its ability to do so, you also need this add-on:

Video Background Play Fix https://addons.mozilla.org/en-US/firefox/addon/video-backgro...

Can't you already do that by using multiple tabs?
I'm not sure that's actually true in practice.

I think a better question is why would a talk/podcaster be using YouTube for distribution?

Use Newpipe, now you can.
If you're in the US, you can do that with Youtube Red.
But I'm not, so I'm not allowed to. I wouldn't have a problem with it if I could - paying for ad-free YouTube with added features seems like a fair deal to me.
Amusingly, this does answer the parent question.
That’s their problem. A browser should always give a user the upper hand.

Browser block popups, forcefully enable right-click on sites that disable it, browsers allow users to forcefully enable zoom, or background playback.

And just like that, browsers should also allow users to forcefully enable PiP.

In a similar fashion, Firefox for Android should prevent YouTube from pausing when it detects it has lost focus, as that's clearly an abuse of power with the shameless intent to inhibit non-Chrome browser functionality. See my other comment a little up the tree.

Too bad Mozilla won't ever dare to defend themselves from Google's bullying and will happily accept having background playback on YouTube, until now one of the primary motives for people to try Fennec out, being taken away.

https://bugzilla.mozilla.org/show_bug.cgi?id=1355407

RESOLVED WONTFIX

Thank you for sharing this. These are exactly the types of pain points where Mozilla could distinguish itself.
Is that something that can be done with a Chrome extension?

If not, then since Chromium is open-source, I imagine you could hack it in to a personal copy.

Chrome for Android does not support extensions.
This is unclear. Do you work for Youtube or Android?

E: This is a simple and earnest question. Why the downvotes?

Responsive Web Design (RWD) is a Web development concept focusing on making sites look and behave optimally on all personal computing devices, from desktop to mobile. [1]

The viewport meta tag is part of what makes RWD possible. [2] The viewport meta tag does not relate to PiP in any way that I can imagine.

[1]: https://developer.mozilla.org/en-US/docs/Glossary/Responsive...

[2]: https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/View...

Wondering if relate to YouTube Red sales.
It's always bothered me that you have to pay for this extra service in order to get audio to stream in the background.
For what it's worth, you can disable PiP on your own site by responding to the JS event and changing the value of video.webkitPresentationMode. https://developer.apple.com/library/content/releasenotes/Gen...