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

cobra87
  • 71
  • 2
  • 2
    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](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). – hindmost Feb 25 '19 at 07:30

0 Answers0