Interface DownloadOpts

Hierarchy

  • DownloadOpts

Properties

doSave?: boolean

Whether to save the downloaded files to the user's file system.

onProgress?: ((progress: number) => void)

Type declaration

    • (progress: number): void
    • Callback invoked every time a chunk of data is received. progress is the normalized (0-1) percentage value of download progress.

      Parameters

      • progress: number

      Returns void

torrentOpts?: TorrentOptions

Additional TorrentOptions to provide to WebTorrent for the download. Merges with and overrides any options provided via the FileTransfer constructor's torrentOpts option.

See

https://github.com/webtorrent/webtorrent/blob/master/docs/api.md#clientaddtorrentid-opts-function-ontorrent-torrent-

Generated using TypeDoc