-
is there a progress bar? |
Beta Was this translation helpful? Give feedback.
Answered by
qgustavor
Mar 24, 2022
Replies: 1 comment 3 replies
-
You can implement a progress bar by listening to |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
qgustavor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can implement a progress bar by listening to
progress
events on the stream returned by.download()
. For reference implementations check direct-mega's implementation for a browser implementation and megajs-cli for a Node implementation. Notice that in those implementations only a percentage is displayed to the user, since it's easier to implement, in order to implement a progress bar just feed this data to a<progress>
element (in browser) or a progress bar library such as this one for Node and this one for Deno.