Skip to content

progress bar? #95

Answered by qgustavor
zaourzag asked this question in Q&A
Mar 24, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@zaourzag
Comment options

@qgustavor
Comment options

@qgustavor
Comment options

Answer selected by qgustavor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #94 on March 24, 2022 18:01.