Data Transfer size from server to browser (Data downloaded/bandwidth usage)
Asked Answered
C

0

6

I am working on a video streaming application in javascript, i want to tell user how much mbs of data user have consumed/used or how much data has been transferred from server to your browser.

I can see the data transfer size in network tab of browser but i don't know the right way to get the actual transfer size of data from server to browser pragmatically on client side.

I have found a browser performance API that is PerformanceResourceTiming API. This api provide data transfer size attribute but it is not working in safari browser.

What is the right way to do find actual data size transferred and which works on every browser/environment

Christean answered 25/2, 2019 at 6:36 Comment(1)
It seems that you chose a bit wrong approach. It would be better to use the means provided (or accompanied) by streaming method you use. Whichever one you use it should provide a way to get transfer-related info. For instance, if you use HTML5 video API in conjunction with fetch, you have full access to transfer info via Fetch API.Imprisonment

© 2022 - 2024 — McMap. All rights reserved.