brave / brave-ios

Brave iOS Browser
https://brave.com
Mozilla Public License 2.0
1.7k stars 441 forks source link

YouTube issue when device in lockdown mode #6808

Open anthonypkeane opened 1 year ago

anthonypkeane commented 1 year ago

Description:

Potential issue here https://appfigures.com/reviews/42132121512L1t_EggJZ-9SoYx0mMimAwQ?lang=en

When Lockdown mode is enabled and you are playing a YouTube video, when you exit the app and return the video is just black. When you press play it’ll play audio but not the video. Tried restarting, reinstalling, a different phone, nothing. This has been occurring for months. Tried making an account on the forum to report this but then it said no matter what username I wanted it was unavailable and suggested some random string.

Brandon-T commented 1 year ago

Hmm, I entered LockDown mode on iOS 16.2, iPhone 12 Pro, and was not able to reproduce this bug in ANY browser, including Brave.

Anyone else able to reproduce the issue?

Ofenhed commented 1 year ago

@Brandon-T It's still there in 16.5.1.

For anyone annoyed by this issue, a workaround is a quick swap to another tab and back.

A possibly related issue is that automatic PiP mode doesn't work. It does work, however, if the video is played through the watchlist instead.

Brandon-T commented 1 year ago

@Ofenhed

Hey, so far none of the devs have been able to reproduce the issue.

PIP also is not available in lockdown mode (WebKit blocks it). It's not available in Safari either.

Are you doing anything different to enter pip somehow bypassing lockdown restrictions?

When the black screen issue occurs: Are you backgrounding the app or killing it? If backgrounding, how long are you backgrounding it? If locking the screen, how long are you leaving it locked?

Ofenhed commented 1 year ago

Are you doing anything different to enter pip somehow bypassing lockdown restrictions?

The PiP mode is probably outside the WebKit engine. I open the video in "Brave Playlist", and that's where I enter PiP mode. This works for me regardless of whether I click the PiP button or simply swipe to the Home Screen.

Are you backgrounding the app or killing it?

Backgrounding. Right now I can't actually recreate it. That makes me think that the issue may depend on something external, like a memory issue or a a broken state in iOS. This is very strange to me, because this usually happens more often than not for the last couple of weeks, and I came looking for this issue right after an instance. I have not restarted my phone since it last happened. I think I've tried killing the app when the issue occurred without it being solved.

I will add a new comment with your tag when I have more than my memory and gut feeling.

If backgrounding, how long are you backgrounding it?

I've seen it happen when I've swapped out for a few seconds.

If locking the screen, how long are you leaving it locked?

Not sure.

Ofenhed commented 1 year ago

Killing the app when it's in the broken state makes the problem go away.

Ofenhed commented 1 year ago

Having thought about this a lot more when noticing it, it only happens while in full screen. I have seen on another site that clicking the full screen button again brings back the video in the place of the black screen in the player, but it does not on YouTube. I'm guessing the difference is that YouTube sets full screen and the other site toggled full screen.

Video example of the issue occurring