44
55import Foundation
66
7+ // MARK: - Direct Upload Options
8+
79/// Options for the direct upload
810public struct DirectUploadOptions {
911
1012 // MARK: - Transport Options
1113
12- /// Options to control the SDK network operations to
13- /// transport the direct upload input to Mux
14+ /// Options to adjust ``DirectUpload`` chunk transport
15+ /// over the network.
1416 public struct Transport {
1517
16- /// At least 8M is recommended
18+ /// The size of each file chunk in bytes sent by the
19+ /// SDK during an upload. At least 8MB is recommended.
1720 public var chunkSizeInBytes : Int
1821
19- /// Number of retry attempts per chunk if the
20- /// associated request fails
22+ /// Number of retry attempts per chunk if its upload
23+ /// request is unsuccessful
2124 public var retryLimitPerChunk : Int
2225
23- /// A default set of transport options: 8MB chunk
24- /// size and chunk request retry limit of 3
26+ /// Default options for ``DirectUpload`` chunk transport
27+ /// over the network. The chunk size is 8MB and the
28+ /// per-chunk retry limit is 3.
2529 public static var `default` : Transport {
2630 Transport (
2731 chunkSizeInBytes: 8 * 1024 * 1024 ,
2832 retryLimitPerChunk: 3
2933 )
3034 }
3135
32- /// Initializes options that govern network transport
33- /// by the SDK
36+ /// Initializes options for upload chunk transport
37+ /// over the network
3438 ///
3539 /// - Parameters:
36- /// - chunkSize : the size of each file chunk in
40+ /// - chunkSizeInBytes : the size of each file chunk in
3741 /// bytes the SDK sends when uploading, default
3842 /// value is 8MB
39- /// - retriesPerChunk : number of retry attempts
43+ /// - retryLimitPerChunk : number of retry attempts
4044 /// if the chunk request fails, default value is 3
4145 public init (
4246 chunkSizeInBytes: Int = 8 * 1024 * 1024 ,
@@ -52,7 +56,9 @@ public struct DirectUploadOptions {
5256
5357 // MARK: - Input Standardization Options
5458
55- /// Options controlling direct upload input standardization
59+ /// Options for adjusments made by ``DirectUpload``
60+ /// to some inputs to minimize processing time during
61+ /// ingestion
5662 public struct InputStandardization {
5763
5864 /// If requested the SDK will attempt to detect
@@ -124,8 +130,8 @@ public struct DirectUploadOptions {
124130 maximumResolution: . default
125131 )
126132
127- // Kept private to an invalid combination of parameters
128- // being used for initialization
133+ // Kept private to avoid an invalid combination of
134+ // parameters being used for initialization
129135 private init (
130136 isRequested: Bool ,
131137 maximumResolution: MaximumResolution
@@ -134,10 +140,8 @@ public struct DirectUploadOptions {
134140 self . maximumResolution = maximumResolution
135141 }
136142
137- /// Used to initialize ``DirectUploadOptions.InputStandardization``
138- /// with that enables input standardization with
139- /// a maximum resolution
140- ///
143+ /// Initializes options that request input
144+ /// standardization with a custom maximum resolution
141145 /// - Parameters:
142146 /// - maximumResolution: the maximum resolution
143147 /// of the standardized input
@@ -213,11 +217,18 @@ public struct DirectUploadOptions {
213217 /// disable standardizing the format of the direct
214218 /// upload inputs, it is requested by default. To
215219 /// prevent the SDK from making any changes to the
220+ /// - Parameters:
221+ /// - eventTracking: event tracking options for the
222+ /// direct upload
223+ /// - inputStandardization: options to enable or
224+ /// disable standardizing the format of the direct
225+ /// upload inputs. True by default.
226+ /// To prevent the SDK from making any changes to the
216227 /// format of the input use ``DirectUploadOptions.InputStandardization.skipped``
217- /// - chunkSize: the size of each file chunk in
218- /// bytes the SDK sends when uploading, default
219- /// value is 8MB
220- /// - retriesPerChunk : number of retry attempts
228+ /// - chunkSizeInBytes: The size of each file chunk
229+ /// in bytes sent by the SDK during an upload.
230+ /// Defaults to 8MB.
231+ /// - retryLimitPerChunk : number of retry attempts
221232 /// if the chunk request fails, default value is 3
222233 public init (
223234 eventTracking: EventTracking = . default,
0 commit comments