-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to know how many MB are downloaded from the server or peers #3384
Comments
It splits between P2P & HTTP. But isn't the server considered a "Peer" when using P2P? If so, how could we distinguish the server from other peers? Would |
@Poslovitch It is a peer, using webseed. Just checking the peer’s IP matches the resolved IP from the origin server domain name should be enough. |
Okay, I might work on that, but I'll have to dig deeper into PeerTube and learn a few things first. |
@rigelk I found this NodeJS lib (https://nodejs.org/api/dns.html#dns_dns_lookup_hostname_options_callback) |
@Poslovitch you are looking at the NodeJS standard library 🙃 But please check the API exists in all ranges of NodeJS supported by PeerTube I’m curious though: what are you planning to do server-side to adress what seems like a client-side computation? |
Webtorrent player does not have the info peer VS HTTP:
But our HLS player has:
Our webtorrent player is in maintenance mode, so it's fine if we only implement this issue in the HLS player. |
@rigelk According to the docs, this lib exists nearly since the inception of NodeJS. I guess that means it's supported by PeerTube (which, afaik, is >= 10 and < 13, right?) @Chocobozzz @rigelk I hope I'm not wasting your time on that - I sort of use PeerTube as a learning/practicing project to learn TypeScript and Angular (I've only used "vanilla" JS so far) -. Here's what I want to do, based on what you suggested me:
Sadly, the things that are in bold are those I currently don't know how to do. However, I've noticed this line:
Would |
The p2p-media-loader plugin already gives you appropriate stats: So just update |
Implements Chocobozzz#3384 This will only work with HLS. The display for Webtorrent is left untouched.
Implements #3384 This will only work with HLS. The display for Webtorrent is left untouched. Co-authored-by: Rigel Kent <[email protected]>
Describe the problem to be solved
When watching a video, I would like to be able to know how many megabytes are downloaded from the server and/or from peers.
So we could estimate how efficient is the P2P mechanism.
Describe the solution you would like:
When hovering with the mouse the Download/Upload/Peers part of the player, I would love to have « Total Downloaded » separated in « Downloaded from the server » and « Downloaded from peers ».
The text was updated successfully, but these errors were encountered: