]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Disable chunk upload on ios
authorChocobozzz <me@florianbigard.com>
Thu, 9 Sep 2021 08:31:30 +0000 (10:31 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 9 Sep 2021 08:31:30 +0000 (10:31 +0200)
See https://github.com/kukhariev/ngx-uploadx/issues/316#issuecomment-915858713

client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts

index 56051cf4ca6a0319dbb6759d710be0c52e5134c3..5fc8b21fb3e787c27509794e6de7e7b9a053db7d 100644 (file)
@@ -10,6 +10,7 @@ import { LoadingBarService } from '@ngx-loading-bar/core'
 import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models'
 import { UploaderXFormData } from './uploaderx-form-data'
 import { VideoSend } from './video-send'
+import { isIOS } from 'src/assets/player/utils'
 
 @Component({
   selector: 'my-video-upload',
@@ -69,11 +70,17 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
   ) {
     super()
 
+    // FIXME: https://github.com/Chocobozzz/PeerTube/issues/4382#issuecomment-915854167
+    const chunkSize = isIOS()
+      ? 0
+      : undefined // Auto chunk size
+
     this.uploadxOptions = {
       endpoint: this.BASE_VIDEO_UPLOAD_URL,
       multiple: false,
       token: this.authService.getAccessToken(),
       uploaderClass: UploaderXFormData,
+      chunkSize,
       retryConfig: {
         maxAttempts: 6,
         shouldRetry: (code: number) => {