Mobile users often don't have a lot of data plan so this could be a problem.
Some ideas :
It's a very good idea. But I don't think we can detect if the user is on 3g/4g or on wifi, so just don't seed on mobile device.
Or just have an option like checkbox for seed ?
But I don't think we can detect if the user is on 3g/4g or on wifi
https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API
After digging a little : https://github.com/webtorrent/webtorrent/issues/480 ...
I opened another issue : https://github.com/webtorrent/webtorrent/issues/1212
Since detecting if the user is on a mobile network has scarce support, we could make the assumption phones are using a mobile network and just detect is the client is on a phone (detecting that is way easier).
Of course that is not perfect, but it's patching the most critical use case, where phone contracts often have limited data volumes.
Speaking of a mobile detection library: https://github.com/KoderLabs/ngx-device-detector - but maybe there is something even more lightweight?
EDIT: some testing shows webtorrent shares very little data on mobile connections anyway
Implemented in our new player in https://github.com/Chocobozzz/PeerTube/commit/39aad8cc856a8173e7a77c198b3968952d39f4b7
Most helpful comment
https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API