Sie sind nicht angemeldet.

1

Mittwoch, 1. Juni 2022, 20:29

Data usage counter

Hi guys,

I'm trying to figure out a way to show a data usage counter.

While the user moves and zooms in the panorama diffrent tiles are loaded all the time. I want to add the sum of data transferred between the server and the user, hence the data usage without the panorama. E. g. the sum of the filesize of the shown tiles.

Anybody can give me a hint on how to achieve that?

Thank you!

2

Freitag, 3. Juni 2022, 11:54

Hi,

sorry, but I don't think that's possible... (with the current available Browser APIs).

krpano loads the tiles/images directly as HTML Image and not as Byte-Array for later decoding and so file-size information are not available.

Best regards,
Klaus

3

Samstag, 4. Juni 2022, 15:48

Thanks for the answer.

So let's say I generate an array with all file names and their size in an XML file - Do I now have a chance? ;-)

Greetings

4

Samstag, 4. Juni 2022, 18:04

Hi,

yes, when you have such array you could use the customParsePath and customParseTilePath APIs to get each file loading request:
https://krpano.com/docu/plugininterface/#customParsePath
https://krpano.com/docu/plugininterface/#customParseTilePath

and then search for the requested file in your array and get its size...

Best regards,
Klaus