Project

General

Profile

Actions

Feature #1083

open

Media playback config support

Added by ask low 8 months ago. Updated 7 months ago.

Status:
New
Priority:
4.x
Start date:
09/11/2023
Due date:
% Done:

0%

Estimated time:

Description

Disabling images is useful to reduce data usage on lower bandwidth. But videos still continue to buffer.
In a typical chrome scenario, there's Media Autoplay config within site settings that offers on & off toggle. That helps us to turn off whatever rogue media from autoplaying, such as news sites.

Actions #1

Updated by Soren Stoutner 8 months ago

Are you aware of any way to do that with Android's WebView?

Actions #2

Updated by ask low 8 months ago

Welp. I'm not sure, which is why discussing about the possibility.

Btw, I can't seem to edit the posted comments. Why so?

Actions #3

Updated by Soren Stoutner 8 months ago

  • Assignee set to Soren Stoutner

I have not see any controls for that type of thing, although you are welcome to look through the Android WebView documentation. The controls for displaying images is at:

https://developer.android.com/reference/android/webkit/WebSettings#setLoadsImagesAutomatically(boolean)

Note that media autoplay is already disabled by default, so whatever behavior you are seeing is somehow working around that.

https://developer.android.com/reference/android/webkit/WebSettings#setMediaPlaybackRequiresUserGesture(boolean)

Also, because most websites require require JavaScript to play videos, I would imagine that browsing with JavaScript disabled would prevent most videos from automatically downloading.

Actions #4

Updated by ask low 8 months ago

Yes you are right. No script session doesn't even have the video player pop ups at all. Although, controlling this behavior in JS session like how chromium does, would be a delight anyways.

Btw, all it does is interrupt autoplay. The buffering, like initial 10 seconds still happens, which is annoying asf... especially when I'm on metered network while traveling...

I guess nojs session would be better alternative for now.

Actions #5

Updated by Soren Stoutner 8 months ago

  • Priority changed from 3.x to 4.x

It might be possible to control this behavior with Privacy WebView in the 4.x series. I will have to take a look at the options then.

Actions #6

Updated by ask low 8 months ago

Btw, is there an issue lying around that mentions the detection of metered/unmetered network ?
Having access to a full bandwidth unmetered network, would mean that user can keep images toggle enabled throughout the browsing session.

Actions #7

Updated by Soren Stoutner 8 months ago

For security and privacy reasons, Privacy Browser Android will never include the android.permission.ACCESS_NETWORK_STATE permission.

https://developer.android.com/training/basics/network-ops/reading-network-state

As such, there is no way for Privacy Browser Android to automatically determine if a user is on a metered network. It is up to the user to know that and adjust their behavior accordingly.

Actions #8

Updated by Soren Stoutner 7 months ago

  • Subject changed from media playback config support to Media playback config support
Actions

Also available in: Atom PDF