News for hackers. Stuff that matters.
Re:Safari on iOS can overlap multiple full-screen videos by hbn on Thursday June 16, 2022 @03:10PM (#31769761)
I've discovered this while fighting another issue: if you long-press a link to a video file to try and save it to your device (I occasionally do this while ripping videos from Twitter), you get the long-press context menu you want (with the "download linked file" item) for like half a second before the full screen video covers up your whole screen, and when you swipe it away the context menu is gone.

You literally have to race the video popup, and sometimes I just have to memorize the location on my phone's screen where the "download linked file" button will appear and have my finger ready over the spot because there's not enough time to scan over all the menu items.

Re:Safari on iOS can overlap multiple full-screen videos by TechBro8615 on Thursday June 16, 2022 @03:54PM (#31770201)
FYI if you notice regressive behavior on YouTube in mobile Safari, eg unable to use the operating system’s picture-in-picture mode, this is due to Google injecting a script to close the video when focus leaves the page.

You can fix this bug by installing a Safari extension called Vinegar which will convert non-standard video containers to standard HTML5 video elements. As a bonus, this also prevents content injection by the malicious code that google sends to your browser to render content from third party advertisers on your device without your consent.

Re:Safari on iOS can overlap multiple full-screen videos by 2fast4you on Thursday June 16, 2022 @05:09PM (#31771000)
Thank you! This makes YouTube usable again on my iPhone. Now if only I could get SponsorBlock…
Re:Safari on iOS can overlap multiple full-screen videos by LeoPanthera on Thursday June 16, 2022 @08:15PM (#31772578)
SponsorBlock is available for iOS. https://github.com/ajayyy/SponsorBlock/wiki/Safari
Re:Safari on iOS can overlap multiple full-screen videos by stingraycharles on Thursday June 16, 2022 @09:18PM (#31772996)
Do these extensions work for just Safari (the browser), or do they get integrated into all webviews, including the actual YouTube app?
Re:Safari on iOS can overlap multiple full-screen videos by ajayyy on Friday June 17, 2022 @01:16AM (#31774360)
Safari extensions only work with Safari, but there is a jailbreak tweak and a sideloaded app you can use to modify the official app
Re:Safari on iOS can overlap multiple full-screen videos by TechBro8615 on Friday June 17, 2022 @12:54PM (#31781003)
Yeah, it’s disappointing that content blockers and Safari extensions are not configurable per-app, in the same way as photos access or whatever else. This seems like an obvious feature, so hopefully the reason for its delay is complexity of implementation; IIRC app developers have basically full access to WebKit in a WebView, so enforcing the use of content blockers would be difficult. But Apple could make implementing content blockers for generic web views a requirement that they check for during review. I say “generic” because there are likely some use cases where the WebView isn’t being used as a general purpose web browser, like it would be in Apollo or Feedly. So it might be infeasible as a hard requirement.

On the other hand, Apple wants to incentivize developers to build apps, and they have a history of gatekeeping features from the browser to force certain use cases into the App Store. So hopefully they’re not omitting this setting to encourage app developers to create apps where they can run their “safe ads” without content blockers.

Re:Safari on iOS can overlap multiple full-screen videos by ajayyy on Friday June 17, 2022 @03:14PM (#31782955)
On Android, they solved this with "Custom Tabs", which is an API that opens a nicely integrated webview with extra buttons added by the app (like a tweet button) but internally is the default browser. Almost all apps use this now. I have this with enabled with Firefox
Re:Safari on iOS can overlap multiple full-screen videos by sen on Thursday June 16, 2022 @07:55PM (#31772433)
> Now if only I could get SponsorBlock

Yeah SponsorBlock is the only reason I still have Firefox installed on my Air. YouTube is horrible without it. I already pay for Premium, I refuse to put up with more ads.

Re:Safari on iOS can overlap multiple full-screen videos by TechBro8615 on Thursday June 16, 2022 @07:05PM (#31772100)
I’m glad I could help! Although really it’s the dev we should thank. It’s been a huge quality of life improvement for me as well.
Re:Safari on iOS can overlap multiple full-screen videos by 2fast4you on Thursday June 16, 2022 @07:17PM (#31772177)
Agreed, left a glowing review!

I checked, Sponsor block is available as well!

Re:Safari on iOS can overlap multiple full-screen videos by yunohn on Thursday June 16, 2022 @10:12PM (#31773391)
> this also prevents content injection by the malicious code that google sends to your browser to render content from third party advertisers on your device without your consent

You’re kidding right?

Deliberately watching videos on a freely provided service supported by ads, makes the ad script “malicious and non-consensual”?

Re:Safari on iOS can overlap multiple full-screen videos by TechBro8615 on Friday June 17, 2022 @01:33PM (#31781513)
I meant it facetiously, but I’m definitely not kidding.

It’s my device, so I can choose what code executes on it. If I choose to block code from executing, that must mean I did not consent to its execution, because otherwise why would I need to block it?

I owe no debt to Google, especially since YouTube is often a non-consensual venue, in the sense that content I want to watch, which Google did not create, is only available on Google’s website.

I was not an active participant in the economic conditions that led to Google’s monopolization of the video hosting market. So if I am only watching a video on YouTube because it’s only hosted on YouTube, but I would have watched it if it were hosted elsewhere, then I am only passively responsible for the choice of watching it on YouTube.

I do not owe anything to Google in this case, because it implies I benefit from the existence of YouTube, but any benefit I derive is actually from the content, not the host of it.

The suggestion that I benefit from Google’s monopoly on video hosting presupposes the idea that free-to-watch video hosts cannot exist without serving advertisements. I don’t believe that, and I always choose alternative hosts over YouTube in the rare case where a video is hosted on both, or banned from YouTube.

I don’t use SponsorBlock, although I do manually scrub past promotional content.

Re:Safari on iOS can overlap multiple full-screen videos by yunohn on Friday June 17, 2022 @02:00PM (#31781933)
I cannot help you with your contempt for other’s choices and your general cognitive dissonance. However do consider:

- Creators use YT for ease of hosting, earnings for their effort, widespread dissemination

- Users choose YT for ease of watching, content discovery, non-bloated UI/UX

Google uses Ads to cover significant hosting and bandwidth costs, as well as to build quality features to help both creators and users alike.

If this logic doesn’t make sense to you, so be it. But your tirade is both entitled and ignorant.

Re:Safari on iOS can overlap multiple full-screen videos by lathiat on Thursday June 16, 2022 @09:39PM (#31773134)
I always assumed this was part of their deal with records companies to basically prevent people using YouTube as a free music streaming service (while keeping music videos there). Partly because before iOS added picture-in-picture they had a feature to enable videos to keep playing as audio only in the background but ONLY if you had YouTube Red/Premium.

Having said that, they now enabled Picture-in-Picture on iOS (though last check it's still in beta I joined the beta a while back) and one of Apple's requirements is you cannot but OS features (such as Picture in Picture) behind an app paywall. So they could only do this by making it available to everyone including free users. Not sure what got them over the line but its there now.

So makes me wonder if that will go away - or whether they still enforce that requirement on Android, or what.

Re:Safari on iOS can overlap multiple full-screen videos by reaperducer on Thursday June 16, 2022 @03:54PM (#31770188)
if you long-press a link to a video file to try and save it to your device (I occasionally do this while ripping videos from Twitter), you get the long-press context menu you want (with the "download linked file" item) for like half a second before the full screen video covers up your whole screen, and when you swipe it away the context menu is gone.

Is it possible that this is related to the iOS link preview feature?

When you long-press a link, do you get the full destination page preview? That might explain why the phone renders the page, including the video taking over.

Long-press on another page link (like one here on HN), and you have a tiny option at the top-right for "Hide preview," select that. Then try another link that has a take-over video, and see if it no longer does that.

If you hate video takeovers more than you like link previews, this might solve your problem.

Re:Safari on iOS can overlap multiple full-screen videos by hbn on Thursday June 16, 2022 @04:02PM (#31770291)
That did indeed fix my issue, thank you!

I don't recall ever using link previews very much. I suppose if I really need it I can toggle it on for that specific instance, but as it is it's not worth it for the video hijacking

Re:Safari on iOS can overlap multiple full-screen videos by ehPReth on Thursday June 16, 2022 @03:15PM (#31769800)
Glad it's not just me! This has been bugging me for quite a while
Re:Safari on iOS can overlap multiple full-screen videos by dutchbrit on Thursday June 16, 2022 @03:41PM (#31770055)
Ha, it's been bugging me for a long time too. Frustrating!
Re:Safari on iOS can overlap multiple full-screen videos by hbn on Thursday June 16, 2022 @04:02PM (#31770299)
Turns out there is a solution! Check the sibling comment:

https://news.ycombinator.com/item?id=31770188