VideoUploadState constructor

VideoUploadState({
  1. String? signedUrl,
  2. Timer? timer,
  3. File? video,
  4. List<File>? chunks,
  5. List? chunksSignedUrls,
  6. int chunkSize = 5 * 1024 * 1024,
  7. String? uploadId,
  8. String? objectName,
  9. bool isPaused = false,
  10. int? pausedChunkIndex,
})

Creates an instance of VideoUploadState.

signedUrl - The signed URL for uploading the video. timer - The timer used for periodic tasks. video - The video file to be uploaded. chunks - A list of video chunks. chunksSignedUrls - A list of signed URLs for each chunk. chunkSize - The size of each chunk in bytes. Defaults to 5 MB. uploadId - The unique identifier for the upload session. objectName - The name of the object being uploaded. isPaused - Indicates if the upload is paused. pausedChunkIndex - The index of the chunk where the upload was paused, if any.

Implementation

VideoUploadState({
  this.signedUrl,
  this.timer,
  this.video,
  List<File>? chunks,
  List? chunksSignedUrls,
  this.chunkSize = 5 * 1024 * 1024,
  this.uploadId,
  this.objectName,
  this.isPaused = false,
  this.pausedChunkIndex,
}) : chunksSignedUrls = chunksSignedUrls ?? [] {
  if (chunks != null) {
    this.chunks.addAll(chunks);
  }
}