How to know video size when working with vGet library? I need to download video in my application and monitor how much is left until the end of the download, I already figured out the download speed, now I need to find out the video size ...
1 answer
Solved a problem. Who in the subject here is the code:
public String getSizeVideo(VGet v, DownloadInfo downloadInfo) { downloadInfo = v.getVideo().getInfo().get(0); return getFileSizeMegaBytes(downloadInfo.getLength())); } private String getFileSizeMegaBytes(long length) { return (double) length/(1024*1024)+" mb"; } |