メインコンテンツへスキップ

cloneStreamMonitorProgress

Callable

  • cloneStreamMonitorProgress(stream: ReadableStream<Uint8Array>, total: number, onProgress: (event: CustomEvent<DownloadProgress>) => void): ReadableStream<Uint8Array>

  • Clones a ReadableStream and returns a version that calls the onProgress callback as the #progress changes.


    Parameters

    • stream: ReadableStream<Uint8Array>

      The ReadableStream to clone.

    • total: number

      The total number of bytes to load.

    • onProgress: (event: CustomEvent<DownloadProgress>) => void

      The callback to call when the download #progress changes.

      Returns ReadableStream<Uint8Array>

      The cloned ReadableStream