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',
) {
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) => {
let text = ''
if (this.videoUploaded === true) {
- // FIXME: cannot concatenate strings using $localize
+ // We can't concatenate strings using $localize
text = $localize`Your video was uploaded to your account and is private.` + ' ' +
$localize`But associated data (tags, description...) will be lost, are you sure you want to leave this page?`
} else {