@@ -52,6 +52,9 @@ public final class InterstitialTagBuilder {
52
52
/// the duration of the interstitial content in seconds
53
53
var duration : Double ?
54
54
55
+ /// the expected duration of the interstitial content in seconds which can indicate a value when the actual duration is not yet known
56
+ var plannedDuration : Double ?
57
+
55
58
/// The value of X-RESUME-OFFSET is a decimal-floating-point of seconds that specifies where primary playback is to resume
56
59
/// following the playback of the interstitial.
57
60
var resumeOffset : Double ?
@@ -122,6 +125,18 @@ public final class InterstitialTagBuilder {
122
125
return self
123
126
}
124
127
128
+ /// Specifies the planned duration of the interstitial
129
+ ///
130
+ /// - Parameter duration: `Double` indicating duration
131
+ ///
132
+ /// - Returns: an instance of the builder
133
+ @discardableResult
134
+ public func withPlannedDuration( _ plannedDuration: Double ) -> Self {
135
+ self . plannedDuration = plannedDuration
136
+
137
+ return self
138
+ }
139
+
125
140
/// Configures the interstitial with a resume offset
126
141
///
127
142
/// - Parameter offset: `Double` indicating the resume offset
@@ -240,17 +255,23 @@ public final class InterstitialTagBuilder {
240
255
}
241
256
242
257
if let duration {
243
- hlsTagDictionary [ PantosValue . duration. rawValue] = HLSValueData ( value: String ( duration) , quoteEscaped: true )
258
+ hlsTagDictionary [ PantosValue . duration. rawValue] = HLSValueData ( value: String ( duration) ,
259
+ quoteEscaped: false )
260
+ }
261
+
262
+ if let plannedDuration {
263
+ hlsTagDictionary [ PantosValue . plannedDuration. rawValue] = HLSValueData ( value: String ( plannedDuration) ,
264
+ quoteEscaped: false )
244
265
}
245
266
246
267
if let resumeOffset {
247
268
hlsTagDictionary [ PantosValue . resumeOffset. rawValue] = HLSValueData ( value: String ( resumeOffset) ,
248
- quoteEscaped: true )
269
+ quoteEscaped: false )
249
270
}
250
271
251
272
if let playoutLimit {
252
273
hlsTagDictionary [ PantosValue . playoutLimit. rawValue] = HLSValueData ( value: String ( playoutLimit) ,
253
- quoteEscaped: true )
274
+ quoteEscaped: false )
254
275
}
255
276
256
277
if let restrictions {
0 commit comments