@shortkitsdk/react-native 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ShortKitReactNative.podspec +8 -1
- package/ios/ShortKitBridge.swift +1 -1
- package/ios/ShortKitCarouselOverlayBridge.swift +1 -1
- package/ios/ShortKitFeedView.swift +1 -1
- package/ios/ShortKitOverlayBridge.swift +1 -1
- package/ios/ShortKitPlayerNativeView.swift +1 -1
- package/ios/ShortKitSDK.xcframework/Info.plist +43 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +417 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Info.plist +16 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +27739 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +790 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftinterface +790 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/module.modulemap +4 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Headers/ShortKitSDK-Swift.h +417 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Info.plist +16 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +27739 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +790 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +790 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/Modules/module.modulemap +4 -0
- package/ios/ShortKitSDK.xcframework/ios-arm64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
- package/ios/ShortKitWidgetNativeView.swift +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,790 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
|
|
3
|
+
// swift-module-flags: -target arm64-apple-ios16.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -O -module-name ShortKitSDK -package-name swift_sdk
|
|
4
|
+
// swift-module-flags-ignorable: -interface-compiler-version 6.1
|
|
5
|
+
import AVFoundation
|
|
6
|
+
import Combine
|
|
7
|
+
import CoreGraphics
|
|
8
|
+
import Foundation
|
|
9
|
+
import Network
|
|
10
|
+
import Swift
|
|
11
|
+
import SwiftUI
|
|
12
|
+
import UIKit
|
|
13
|
+
import _Concurrency
|
|
14
|
+
import _StringProcessing
|
|
15
|
+
import _SwiftConcurrencyShims
|
|
16
|
+
public enum AdQuartile {
|
|
17
|
+
case first
|
|
18
|
+
case midpoint
|
|
19
|
+
case third
|
|
20
|
+
public static func == (a: ShortKitSDK.AdQuartile, b: ShortKitSDK.AdQuartile) -> Swift.Bool
|
|
21
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
22
|
+
public var hashValue: Swift.Int {
|
|
23
|
+
get
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
public protocol ShortKitAdDelegate : AnyObject {
|
|
27
|
+
func adDidStart(_ ad: ShortKitSDK.PreparedAd)
|
|
28
|
+
func adDidReachQuartile(_ ad: ShortKitSDK.PreparedAd, quartile: ShortKitSDK.AdQuartile)
|
|
29
|
+
func adDidComplete(_ ad: ShortKitSDK.PreparedAd)
|
|
30
|
+
func adWasSkipped(_ ad: ShortKitSDK.PreparedAd, watchTime: Foundation.TimeInterval)
|
|
31
|
+
func adDidFail(_ ad: ShortKitSDK.PreparedAd, error: ShortKitSDK.AdError)
|
|
32
|
+
func adDidReceiveClick(_ ad: ShortKitSDK.PreparedAd)
|
|
33
|
+
}
|
|
34
|
+
public protocol ShortKitAdProvider : AnyObject {
|
|
35
|
+
func loadAd(for slot: ShortKitSDK.AdSlot, completion: @escaping (Swift.Result<ShortKitSDK.PreparedAd, ShortKitSDK.AdError>) -> Swift.Void)
|
|
36
|
+
func displayAd(_ ad: ShortKitSDK.PreparedAd, in container: UIKit.UIView, presentingViewController: UIKit.UIViewController, delegate: any ShortKitSDK.ShortKitAdDelegate)
|
|
37
|
+
func dismissAd(_ ad: ShortKitSDK.PreparedAd)
|
|
38
|
+
}
|
|
39
|
+
public protocol BandwidthMonitorProtocol : AnyObject {
|
|
40
|
+
var isDesaturated: Swift.Bool { get }
|
|
41
|
+
var onDesaturationChanged: ((Swift.Bool) -> Swift.Void)? { get set }
|
|
42
|
+
func startObserving(activePlayer: AVFoundation.AVPlayer, nextPlayer: AVFoundation.AVPlayer?)
|
|
43
|
+
func stopObserving()
|
|
44
|
+
}
|
|
45
|
+
final public class BandwidthMonitor : ShortKitSDK.BandwidthMonitorProtocol {
|
|
46
|
+
final public var isDesaturated: Swift.Bool {
|
|
47
|
+
get
|
|
48
|
+
}
|
|
49
|
+
final public var onDesaturationChanged: ((Swift.Bool) -> Swift.Void)?
|
|
50
|
+
public init(activeThreshold: Foundation.TimeInterval = 15.0, nextThreshold: Foundation.TimeInterval = 2.0, pollInterval: Foundation.TimeInterval = 2.0)
|
|
51
|
+
@objc deinit
|
|
52
|
+
final public func startObserving(activePlayer: AVFoundation.AVPlayer, nextPlayer: AVFoundation.AVPlayer?)
|
|
53
|
+
final public func stopObserving()
|
|
54
|
+
public static func isDesaturated(activeBufferedAhead: Foundation.TimeInterval, activeThreshold: Foundation.TimeInterval, nextBuffered: Foundation.TimeInterval, nextThreshold: Foundation.TimeInterval) -> Swift.Bool
|
|
55
|
+
}
|
|
56
|
+
@objc final public class CachingResourceLoader : ObjectiveC.NSObject, AVFoundation.AVAssetResourceLoaderDelegate, @unchecked Swift.Sendable {
|
|
57
|
+
public static let cacheScheme: Swift.String
|
|
58
|
+
final public let segmentCache: any ShortKitSDK.SegmentCacheProtocol
|
|
59
|
+
final public var segmentServer: ShortKitSDK.SegmentHTTPServer?
|
|
60
|
+
public init(segmentCache: any ShortKitSDK.SegmentCacheProtocol, session: Foundation.URLSession = .shared)
|
|
61
|
+
final public var urlMapping: [Foundation.URL : Foundation.URL] {
|
|
62
|
+
get
|
|
63
|
+
}
|
|
64
|
+
public static func cacheSchemeURL(for url: Foundation.URL) -> Foundation.URL
|
|
65
|
+
public static func originalURL(for url: Foundation.URL) -> Foundation.URL
|
|
66
|
+
public static func isSegmentRequest(_ url: Foundation.URL) -> Swift.Bool
|
|
67
|
+
public static func isManifestRequest(_ url: Foundation.URL) -> Swift.Bool
|
|
68
|
+
public static func segmentIndex(from url: Foundation.URL) -> Swift.Int?
|
|
69
|
+
public static func shouldServeCached(videoID: Swift.String, rendition: Swift.String, segmentIndex: Swift.Int, cache: any ShortKitSDK.SegmentCacheProtocol) -> Swift.Bool
|
|
70
|
+
final public func makeAsset(for url: Foundation.URL, videoID: Swift.String, rendition: Swift.String) -> AVFoundation.AVURLAsset
|
|
71
|
+
final public func hasCachedContent(for videoID: Swift.String) -> Swift.Bool
|
|
72
|
+
final public func cachedRendition(for videoID: Swift.String) -> Swift.String?
|
|
73
|
+
@objc final public func resourceLoader(_ resourceLoader: AVFoundation.AVAssetResourceLoader, shouldWaitForLoadingOfRequestedResource loadingRequest: AVFoundation.AVAssetResourceLoadingRequest) -> Swift.Bool
|
|
74
|
+
@objc final public func resourceLoader(_ resourceLoader: AVFoundation.AVAssetResourceLoader, didCancel loadingRequest: AVFoundation.AVAssetResourceLoadingRequest)
|
|
75
|
+
@objc deinit
|
|
76
|
+
}
|
|
77
|
+
public protocol ColdStartManagerProtocol : Swift.Sendable {
|
|
78
|
+
func cachedFeedItems() -> [ShortKitSDK.FeedItem]
|
|
79
|
+
var hasCachedContent: Swift.Bool { get }
|
|
80
|
+
}
|
|
81
|
+
final public class ColdStartManager : ShortKitSDK.ColdStartManagerProtocol, @unchecked Swift.Sendable {
|
|
82
|
+
public init(cache: any ShortKitSDK.SegmentCacheProtocol, enabled: Swift.Bool = true)
|
|
83
|
+
final public var hasCachedContent: Swift.Bool {
|
|
84
|
+
get
|
|
85
|
+
}
|
|
86
|
+
final public func cachedFeedItems() -> [ShortKitSDK.FeedItem]
|
|
87
|
+
@objc deinit
|
|
88
|
+
}
|
|
89
|
+
public struct HLSRendition {
|
|
90
|
+
public let bandwidth: Swift.Int
|
|
91
|
+
public let resolution: CoreFoundation.CGSize
|
|
92
|
+
public let url: Foundation.URL
|
|
93
|
+
}
|
|
94
|
+
public struct HLSSegment {
|
|
95
|
+
public let index: Swift.Int
|
|
96
|
+
public let duration: Swift.Double
|
|
97
|
+
public let url: Foundation.URL
|
|
98
|
+
}
|
|
99
|
+
public enum HLSManifestParser {
|
|
100
|
+
public static func parseRenditions(from manifest: Swift.String) -> [ShortKitSDK.HLSRendition]
|
|
101
|
+
public static func selectRendition(from renditions: [ShortKitSDK.HLSRendition], targetHeight: CoreFoundation.CGFloat) -> ShortKitSDK.HLSRendition?
|
|
102
|
+
public static func parseSegments(from manifest: Swift.String) -> [ShortKitSDK.HLSSegment]
|
|
103
|
+
public static func rewriteURLs(in manifest: Swift.String, toScheme scheme: Swift.String) -> Swift.String
|
|
104
|
+
public static func reorderManifest(_ manifest: Swift.String, preferringHeight: CoreFoundation.CGFloat) -> Swift.String
|
|
105
|
+
}
|
|
106
|
+
public struct CachedVideoMeta : Swift.Codable {
|
|
107
|
+
public let contentItem: ShortKitSDK.ContentItem
|
|
108
|
+
public let streamingUrl: Swift.String
|
|
109
|
+
public let cachedRendition: Swift.String
|
|
110
|
+
public let cachedSegmentCount: Swift.Int
|
|
111
|
+
public let cachedAt: Foundation.Date
|
|
112
|
+
public let thumbnailData: Foundation.Data?
|
|
113
|
+
public init(contentItem: ShortKitSDK.ContentItem, streamingUrl: Swift.String, cachedRendition: Swift.String, cachedSegmentCount: Swift.Int, cachedAt: Foundation.Date, thumbnailData: Foundation.Data?)
|
|
114
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
115
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
116
|
+
}
|
|
117
|
+
public protocol SegmentCacheProtocol : AnyObject, Swift.Sendable {
|
|
118
|
+
func segment(for videoID: Swift.String, rendition: Swift.String, index: Swift.Int) -> Foundation.Data?
|
|
119
|
+
func storeSegment(_ data: Foundation.Data, for videoID: Swift.String, rendition: Swift.String, index: Swift.Int)
|
|
120
|
+
func hasSegment(for videoID: Swift.String, rendition: Swift.String, index: Swift.Int) -> Swift.Bool
|
|
121
|
+
func cachedVideoMetas() -> [ShortKitSDK.CachedVideoMeta]
|
|
122
|
+
func storeVideoMeta(_ meta: ShortKitSDK.CachedVideoMeta)
|
|
123
|
+
func videoMeta(for videoID: Swift.String) -> ShortKitSDK.CachedVideoMeta?
|
|
124
|
+
var totalSize: Swift.Int64 { get }
|
|
125
|
+
func evictIfNeeded()
|
|
126
|
+
func clearAll()
|
|
127
|
+
}
|
|
128
|
+
final public class SegmentCache : ShortKitSDK.SegmentCacheProtocol, @unchecked Swift.Sendable {
|
|
129
|
+
public init(directory: Foundation.URL? = nil, budgetBytes: Swift.Int64 = 50 * 1024 * 1024)
|
|
130
|
+
final public func segment(for videoID: Swift.String, rendition: Swift.String, index: Swift.Int) -> Foundation.Data?
|
|
131
|
+
final public func storeSegment(_ data: Foundation.Data, for videoID: Swift.String, rendition: Swift.String, index: Swift.Int)
|
|
132
|
+
final public func hasSegment(for videoID: Swift.String, rendition: Swift.String, index: Swift.Int) -> Swift.Bool
|
|
133
|
+
final public func cachedVideoMetas() -> [ShortKitSDK.CachedVideoMeta]
|
|
134
|
+
final public func storeVideoMeta(_ meta: ShortKitSDK.CachedVideoMeta)
|
|
135
|
+
final public func videoMeta(for videoID: Swift.String) -> ShortKitSDK.CachedVideoMeta?
|
|
136
|
+
final public var totalSize: Swift.Int64 {
|
|
137
|
+
get
|
|
138
|
+
}
|
|
139
|
+
final public func evictIfNeeded()
|
|
140
|
+
final public func clearAll()
|
|
141
|
+
@objc deinit
|
|
142
|
+
}
|
|
143
|
+
final public class SegmentHTTPServer {
|
|
144
|
+
final public var port: Swift.UInt16? {
|
|
145
|
+
get
|
|
146
|
+
}
|
|
147
|
+
public init(cache: any ShortKitSDK.SegmentCacheProtocol)
|
|
148
|
+
@objc deinit
|
|
149
|
+
final public func start() throws
|
|
150
|
+
final public func stop()
|
|
151
|
+
}
|
|
152
|
+
public protocol SegmentPrefetcherProtocol : AnyObject {
|
|
153
|
+
func updateCurrentIndex(_ index: Swift.Int, feedItems: [ShortKitSDK.FeedItem])
|
|
154
|
+
func pause()
|
|
155
|
+
func resume()
|
|
156
|
+
}
|
|
157
|
+
final public class SegmentPrefetcher : ShortKitSDK.SegmentPrefetcherProtocol {
|
|
158
|
+
public init(cache: any ShortKitSDK.SegmentCacheProtocol, monitor: any ShortKitSDK.BandwidthMonitorProtocol, session: Foundation.URLSession? = nil, targetRenditionHeight: Swift.Int = 720, maxCachedVideos: Swift.Int = 7)
|
|
159
|
+
final public func updateCurrentIndex(_ index: Swift.Int, feedItems: [ShortKitSDK.FeedItem])
|
|
160
|
+
final public func pause()
|
|
161
|
+
final public func resume()
|
|
162
|
+
public static func selectTargets(currentIndex: Swift.Int, feedItems: [ShortKitSDK.FeedItem], cache: any ShortKitSDK.SegmentCacheProtocol, maxCount: Swift.Int) -> [ShortKitSDK.ContentItem]
|
|
163
|
+
@objc deinit
|
|
164
|
+
}
|
|
165
|
+
public enum FeedHeight : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
166
|
+
case fullscreen
|
|
167
|
+
case percentage(CoreFoundation.CGFloat)
|
|
168
|
+
public static func == (a: ShortKitSDK.FeedHeight, b: ShortKitSDK.FeedHeight) -> Swift.Bool
|
|
169
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
170
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
171
|
+
}
|
|
172
|
+
public enum FeedSource : Swift.String, Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
173
|
+
case algorithmic
|
|
174
|
+
case custom
|
|
175
|
+
public init?(rawValue: Swift.String)
|
|
176
|
+
public typealias RawValue = Swift.String
|
|
177
|
+
public var rawValue: Swift.String {
|
|
178
|
+
get
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
public struct FeedConfig : Swift.Codable {
|
|
182
|
+
public var feedHeight: ShortKitSDK.FeedHeight
|
|
183
|
+
public var videoOverlay: ShortKitSDK.VideoOverlayMode
|
|
184
|
+
public var carouselOverlay: ShortKitSDK.CarouselOverlayMode
|
|
185
|
+
public var surveyOverlay: ShortKitSDK.SurveyOverlayMode
|
|
186
|
+
public var adOverlay: ShortKitSDK.AdOverlayMode
|
|
187
|
+
public var muteOnStart: Swift.Bool
|
|
188
|
+
public var feedSource: ShortKitSDK.FeedSource
|
|
189
|
+
public var coldStartEnabled: Swift.Bool
|
|
190
|
+
public init(feedHeight: ShortKitSDK.FeedHeight = .fullscreen, videoOverlay: ShortKitSDK.VideoOverlayMode = .none, carouselOverlay: ShortKitSDK.CarouselOverlayMode = .none, surveyOverlay: ShortKitSDK.SurveyOverlayMode = .none, adOverlay: ShortKitSDK.AdOverlayMode = .none, muteOnStart: Swift.Bool = true, feedSource: ShortKitSDK.FeedSource = .algorithmic, coldStartEnabled: Swift.Bool? = nil)
|
|
191
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
192
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
193
|
+
}
|
|
194
|
+
public enum VideoOverlayMode {
|
|
195
|
+
case none
|
|
196
|
+
case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.FeedOverlay)
|
|
197
|
+
}
|
|
198
|
+
extension ShortKitSDK.VideoOverlayMode : Swift.Equatable {
|
|
199
|
+
public static func == (lhs: ShortKitSDK.VideoOverlayMode, rhs: ShortKitSDK.VideoOverlayMode) -> Swift.Bool
|
|
200
|
+
}
|
|
201
|
+
extension ShortKitSDK.VideoOverlayMode : Swift.Codable {
|
|
202
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
203
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
204
|
+
}
|
|
205
|
+
public enum CarouselOverlayMode {
|
|
206
|
+
case none
|
|
207
|
+
case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.CarouselOverlay)
|
|
208
|
+
}
|
|
209
|
+
extension ShortKitSDK.CarouselOverlayMode : Swift.Equatable {
|
|
210
|
+
public static func == (lhs: ShortKitSDK.CarouselOverlayMode, rhs: ShortKitSDK.CarouselOverlayMode) -> Swift.Bool
|
|
211
|
+
}
|
|
212
|
+
extension ShortKitSDK.CarouselOverlayMode : Swift.Codable {
|
|
213
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
214
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
215
|
+
}
|
|
216
|
+
public enum SurveyOverlayMode {
|
|
217
|
+
case none
|
|
218
|
+
case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.SurveyOverlay)
|
|
219
|
+
}
|
|
220
|
+
extension ShortKitSDK.SurveyOverlayMode : Swift.Equatable {
|
|
221
|
+
public static func == (lhs: ShortKitSDK.SurveyOverlayMode, rhs: ShortKitSDK.SurveyOverlayMode) -> Swift.Bool
|
|
222
|
+
}
|
|
223
|
+
extension ShortKitSDK.SurveyOverlayMode : Swift.Codable {
|
|
224
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
225
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
226
|
+
}
|
|
227
|
+
public enum AdOverlayMode {
|
|
228
|
+
case none
|
|
229
|
+
case custom(@Sendable () -> any UIKit.UIView & ShortKitSDK.AdOverlay)
|
|
230
|
+
}
|
|
231
|
+
extension ShortKitSDK.AdOverlayMode : Swift.Equatable {
|
|
232
|
+
public static func == (lhs: ShortKitSDK.AdOverlayMode, rhs: ShortKitSDK.AdOverlayMode) -> Swift.Bool
|
|
233
|
+
}
|
|
234
|
+
extension ShortKitSDK.AdOverlayMode : Swift.Codable {
|
|
235
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
236
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
237
|
+
}
|
|
238
|
+
public protocol ShortKitDelegate : AnyObject {
|
|
239
|
+
func shortKitDidRequestRefresh(_ shortKit: ShortKitSDK.ShortKit)
|
|
240
|
+
func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
241
|
+
}
|
|
242
|
+
extension ShortKitSDK.ShortKitDelegate {
|
|
243
|
+
public func shortKitDidRequestRefresh(_ shortKit: ShortKitSDK.ShortKit)
|
|
244
|
+
public func shortKit(_ shortKit: ShortKitSDK.ShortKit, didTapContent contentId: Swift.String, at index: Swift.Int)
|
|
245
|
+
}
|
|
246
|
+
@_Concurrency.MainActor @preconcurrency public struct ShortKitFeedView : SwiftUI.UIViewControllerRepresentable {
|
|
247
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit)
|
|
248
|
+
@_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitFeedView.Context) -> ShortKitSDK.ShortKitFeedViewController
|
|
249
|
+
@_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitFeedViewController, context: ShortKitSDK.ShortKitFeedView.Context)
|
|
250
|
+
public typealias Body = Swift.Never
|
|
251
|
+
public typealias Coordinator = Swift.Void
|
|
252
|
+
public typealias UIViewControllerType = ShortKitSDK.ShortKitFeedViewController
|
|
253
|
+
}
|
|
254
|
+
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class ShortKitFeedViewController : UIKit.UIViewController {
|
|
255
|
+
@_Concurrency.MainActor @preconcurrency public var onDismiss: (() -> Swift.Void)?
|
|
256
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, startAtItemId: Swift.String? = nil)
|
|
257
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLoad()
|
|
258
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillAppear(_ animated: Swift.Bool)
|
|
259
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
|
|
260
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewWillDisappear(_ animated: Swift.Bool)
|
|
261
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidDisappear(_ animated: Swift.Bool)
|
|
262
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public var supportedInterfaceOrientations: UIKit.UIInterfaceOrientationMask {
|
|
263
|
+
@objc get
|
|
264
|
+
}
|
|
265
|
+
@objc deinit
|
|
266
|
+
}
|
|
267
|
+
extension ShortKitSDK.ShortKitFeedViewController : UIKit.UICollectionViewDelegate {
|
|
268
|
+
@_Concurrency.MainActor @preconcurrency @objc dynamic public func collectionView(_ collectionView: UIKit.UICollectionView, willDisplay cell: UIKit.UICollectionViewCell, forItemAt indexPath: Foundation.IndexPath)
|
|
269
|
+
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewWillEndDragging(_ scrollView: UIKit.UIScrollView, withVelocity velocity: CoreFoundation.CGPoint, targetContentOffset: Swift.UnsafeMutablePointer<CoreFoundation.CGPoint>)
|
|
270
|
+
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewWillBeginDragging(_ scrollView: UIKit.UIScrollView)
|
|
271
|
+
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewDidEndDecelerating(_ scrollView: UIKit.UIScrollView)
|
|
272
|
+
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewDidEndDragging(_ scrollView: UIKit.UIScrollView, willDecelerate decelerate: Swift.Bool)
|
|
273
|
+
@_Concurrency.MainActor @preconcurrency @objc dynamic public func scrollViewDidScroll(_ scrollView: UIKit.UIScrollView)
|
|
274
|
+
}
|
|
275
|
+
extension ShortKitSDK.ShortKitFeedViewController : UIKit.UICollectionViewDataSourcePrefetching {
|
|
276
|
+
@_Concurrency.MainActor @preconcurrency @objc dynamic public func collectionView(_ collectionView: UIKit.UICollectionView, prefetchItemsAt indexPaths: [Foundation.IndexPath])
|
|
277
|
+
}
|
|
278
|
+
extension ShortKitSDK.ShortKitFeedViewController : ShortKitSDK.ShortKitAdDelegate {
|
|
279
|
+
@_Concurrency.MainActor @preconcurrency public func adDidStart(_ ad: ShortKitSDK.PreparedAd)
|
|
280
|
+
@_Concurrency.MainActor @preconcurrency public func adDidReachQuartile(_ ad: ShortKitSDK.PreparedAd, quartile: ShortKitSDK.AdQuartile)
|
|
281
|
+
@_Concurrency.MainActor @preconcurrency public func adDidComplete(_ ad: ShortKitSDK.PreparedAd)
|
|
282
|
+
@_Concurrency.MainActor @preconcurrency public func adWasSkipped(_ ad: ShortKitSDK.PreparedAd, watchTime: Foundation.TimeInterval)
|
|
283
|
+
@_Concurrency.MainActor @preconcurrency public func adDidFail(_ ad: ShortKitSDK.PreparedAd, error: ShortKitSDK.AdError)
|
|
284
|
+
@_Concurrency.MainActor @preconcurrency public func adDidReceiveClick(_ ad: ShortKitSDK.PreparedAd)
|
|
285
|
+
}
|
|
286
|
+
public enum AdError : Swift.Error, Swift.Equatable {
|
|
287
|
+
case noFill
|
|
288
|
+
case timeout
|
|
289
|
+
case networkError(Swift.String)
|
|
290
|
+
case providerError(Swift.String)
|
|
291
|
+
public static func == (a: ShortKitSDK.AdError, b: ShortKitSDK.AdError) -> Swift.Bool
|
|
292
|
+
}
|
|
293
|
+
public enum SkipPolicy : Swift.Sendable, Swift.Equatable {
|
|
294
|
+
case nonSkippable
|
|
295
|
+
case skippableAfter(seconds: Foundation.TimeInterval)
|
|
296
|
+
case alwaysSkippable
|
|
297
|
+
public static func == (a: ShortKitSDK.SkipPolicy, b: ShortKitSDK.SkipPolicy) -> Swift.Bool
|
|
298
|
+
}
|
|
299
|
+
public struct NativeAssetKeyMap : Swift.Codable, Swift.Sendable, Swift.Equatable {
|
|
300
|
+
public let videoUrl: Swift.String?
|
|
301
|
+
public let headline: Swift.String?
|
|
302
|
+
public let ctaText: Swift.String?
|
|
303
|
+
public let sponsorName: Swift.String?
|
|
304
|
+
public let sponsorLogo: Swift.String?
|
|
305
|
+
public init(videoUrl: Swift.String? = nil, headline: Swift.String? = nil, ctaText: Swift.String? = nil, sponsorName: Swift.String? = nil, sponsorLogo: Swift.String? = nil)
|
|
306
|
+
public static func == (a: ShortKitSDK.NativeAssetKeyMap, b: ShortKitSDK.NativeAssetKeyMap) -> Swift.Bool
|
|
307
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
308
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
309
|
+
}
|
|
310
|
+
public struct AdSlot : Swift.Codable, Swift.Sendable, Swift.Equatable {
|
|
311
|
+
public let id: Swift.String
|
|
312
|
+
public let position: Swift.Int
|
|
313
|
+
public let adTagUrl: Swift.String?
|
|
314
|
+
public let adUnitId: Swift.String?
|
|
315
|
+
public let targeting: [Swift.String : Swift.String]
|
|
316
|
+
public let skipPolicy: ShortKitSDK.SkipPolicy
|
|
317
|
+
public let adFormat: Swift.String?
|
|
318
|
+
public let nativeFormatId: Swift.String?
|
|
319
|
+
public let nativeAssetKeys: ShortKitSDK.NativeAssetKeyMap?
|
|
320
|
+
public init(id: Swift.String, position: Swift.Int, adTagUrl: Swift.String? = nil, adUnitId: Swift.String? = nil, targeting: [Swift.String : Swift.String] = [:], skipPolicy: ShortKitSDK.SkipPolicy, adFormat: Swift.String? = nil, nativeFormatId: Swift.String? = nil, nativeAssetKeys: ShortKitSDK.NativeAssetKeyMap? = nil)
|
|
321
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
322
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
323
|
+
public static func == (a: ShortKitSDK.AdSlot, b: ShortKitSDK.AdSlot) -> Swift.Bool
|
|
324
|
+
}
|
|
325
|
+
public enum CaptionSource : Swift.String, Swift.Codable, Swift.Sendable {
|
|
326
|
+
case embedded
|
|
327
|
+
case external
|
|
328
|
+
case generated
|
|
329
|
+
public init?(rawValue: Swift.String)
|
|
330
|
+
public typealias RawValue = Swift.String
|
|
331
|
+
public var rawValue: Swift.String {
|
|
332
|
+
get
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
public struct CaptionTrack : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
336
|
+
public let language: Swift.String
|
|
337
|
+
public let label: Swift.String
|
|
338
|
+
public let source: ShortKitSDK.CaptionSource
|
|
339
|
+
public let url: Swift.String?
|
|
340
|
+
public static func == (a: ShortKitSDK.CaptionTrack, b: ShortKitSDK.CaptionTrack) -> Swift.Bool
|
|
341
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
342
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
343
|
+
}
|
|
344
|
+
public struct ContentItem : Swift.Codable, Swift.Equatable, @unchecked Swift.Sendable {
|
|
345
|
+
public let id: Swift.String
|
|
346
|
+
public var playbackId: Swift.String?
|
|
347
|
+
public let title: Swift.String
|
|
348
|
+
public let description: Swift.String?
|
|
349
|
+
public let duration: Swift.Double
|
|
350
|
+
public let streamingUrl: Swift.String
|
|
351
|
+
public let thumbnailUrl: Swift.String
|
|
352
|
+
public var captionTracks: [ShortKitSDK.CaptionTrack] {
|
|
353
|
+
get
|
|
354
|
+
}
|
|
355
|
+
public let customMetadata: [Swift.String : ShortKitSDK.JSONValue]?
|
|
356
|
+
public let author: Swift.String?
|
|
357
|
+
public let articleUrl: Swift.String?
|
|
358
|
+
public let commentCount: Swift.Int?
|
|
359
|
+
public static func == (a: ShortKitSDK.ContentItem, b: ShortKitSDK.ContentItem) -> Swift.Bool
|
|
360
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
361
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
362
|
+
}
|
|
363
|
+
public enum CustomFeedItem : Swift.Sendable {
|
|
364
|
+
case video(playbackId: Swift.String)
|
|
365
|
+
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
366
|
+
}
|
|
367
|
+
public enum FeedItem : Swift.Sendable {
|
|
368
|
+
case content(ShortKitSDK.ContentItem)
|
|
369
|
+
case adSlot(ShortKitSDK.AdSlot)
|
|
370
|
+
case imageCarousel(ShortKitSDK.ImageCarouselItem)
|
|
371
|
+
case survey(ShortKitSDK.SurveyItem)
|
|
372
|
+
public var isContent: Swift.Bool {
|
|
373
|
+
get
|
|
374
|
+
}
|
|
375
|
+
public var isAdSlot: Swift.Bool {
|
|
376
|
+
get
|
|
377
|
+
}
|
|
378
|
+
public var isImageCarousel: Swift.Bool {
|
|
379
|
+
get
|
|
380
|
+
}
|
|
381
|
+
public var isSurvey: Swift.Bool {
|
|
382
|
+
get
|
|
383
|
+
}
|
|
384
|
+
public var isNonVideo: Swift.Bool {
|
|
385
|
+
get
|
|
386
|
+
}
|
|
387
|
+
public var contentItem: ShortKitSDK.ContentItem? {
|
|
388
|
+
get
|
|
389
|
+
}
|
|
390
|
+
public var adSlot: ShortKitSDK.AdSlot? {
|
|
391
|
+
get
|
|
392
|
+
}
|
|
393
|
+
public var imageCarouselItem: ShortKitSDK.ImageCarouselItem? {
|
|
394
|
+
get
|
|
395
|
+
}
|
|
396
|
+
public var surveyItem: ShortKitSDK.SurveyItem? {
|
|
397
|
+
get
|
|
398
|
+
}
|
|
399
|
+
public var id: Swift.String {
|
|
400
|
+
get
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
extension ShortKitSDK.FeedItem : Swift.Hashable {
|
|
404
|
+
public static func == (lhs: ShortKitSDK.FeedItem, rhs: ShortKitSDK.FeedItem) -> Swift.Bool
|
|
405
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
406
|
+
public var hashValue: Swift.Int {
|
|
407
|
+
get
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
extension ShortKitSDK.FeedItem : Swift.Codable {
|
|
411
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
412
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
413
|
+
}
|
|
414
|
+
public struct ImageCarouselItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
415
|
+
public let id: Swift.String
|
|
416
|
+
public let images: [ShortKitSDK.CarouselImage]
|
|
417
|
+
public let autoScrollInterval: Swift.Double?
|
|
418
|
+
public let caption: Swift.String?
|
|
419
|
+
public let title: Swift.String?
|
|
420
|
+
public let description: Swift.String?
|
|
421
|
+
public let author: Swift.String?
|
|
422
|
+
public let section: Swift.String?
|
|
423
|
+
public let articleUrl: Swift.String?
|
|
424
|
+
public init(id: Swift.String, images: [ShortKitSDK.CarouselImage], autoScrollInterval: Swift.Double? = nil, caption: Swift.String? = nil, title: Swift.String? = nil, description: Swift.String? = nil, author: Swift.String? = nil, section: Swift.String? = nil, articleUrl: Swift.String? = nil)
|
|
425
|
+
public static func == (a: ShortKitSDK.ImageCarouselItem, b: ShortKitSDK.ImageCarouselItem) -> Swift.Bool
|
|
426
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
427
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
428
|
+
}
|
|
429
|
+
public struct CarouselImage : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
430
|
+
public let url: Swift.String
|
|
431
|
+
public let alt: Swift.String?
|
|
432
|
+
public init(url: Swift.String, alt: Swift.String? = nil)
|
|
433
|
+
public static func == (a: ShortKitSDK.CarouselImage, b: ShortKitSDK.CarouselImage) -> Swift.Bool
|
|
434
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
435
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
436
|
+
}
|
|
437
|
+
public enum JSONValue : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
438
|
+
case string(Swift.String)
|
|
439
|
+
case number(Swift.Double)
|
|
440
|
+
case bool(Swift.Bool)
|
|
441
|
+
case object([Swift.String : ShortKitSDK.JSONValue])
|
|
442
|
+
case null
|
|
443
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
444
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
445
|
+
public static func == (a: ShortKitSDK.JSONValue, b: ShortKitSDK.JSONValue) -> Swift.Bool
|
|
446
|
+
}
|
|
447
|
+
public struct NativeAdContent {
|
|
448
|
+
public let videoUrl: Swift.String
|
|
449
|
+
public let headline: Swift.String?
|
|
450
|
+
public let body: Swift.String?
|
|
451
|
+
public let callToAction: Swift.String?
|
|
452
|
+
public let advertiser: Swift.String?
|
|
453
|
+
public let sponsorIcon: UIKit.UIImage?
|
|
454
|
+
public let adChoicesIcon: UIKit.UIImage?
|
|
455
|
+
public let adChoicesClickHandler: (() -> Swift.Void)?
|
|
456
|
+
public let ctaClickHandler: (() -> Swift.Void)?
|
|
457
|
+
public let recordImpression: (() -> Swift.Void)?
|
|
458
|
+
public let aspectRatio: CoreFoundation.CGFloat?
|
|
459
|
+
public init(videoUrl: Swift.String, headline: Swift.String? = nil, body: Swift.String? = nil, callToAction: Swift.String? = nil, advertiser: Swift.String? = nil, sponsorIcon: UIKit.UIImage? = nil, adChoicesIcon: UIKit.UIImage? = nil, adChoicesClickHandler: (() -> Swift.Void)? = nil, ctaClickHandler: (() -> Swift.Void)? = nil, recordImpression: (() -> Swift.Void)? = nil, aspectRatio: CoreFoundation.CGFloat? = nil)
|
|
460
|
+
}
|
|
461
|
+
final public class PreparedAd {
|
|
462
|
+
final public let slotId: Swift.String
|
|
463
|
+
final public let skipPolicy: ShortKitSDK.SkipPolicy
|
|
464
|
+
final public let providerData: Any
|
|
465
|
+
final public let nativeContent: ShortKitSDK.NativeAdContent?
|
|
466
|
+
final public var prebuiltView: UIKit.UIView?
|
|
467
|
+
public init(slotId: Swift.String, skipPolicy: ShortKitSDK.SkipPolicy, providerData: Any, nativeContent: ShortKitSDK.NativeAdContent? = nil)
|
|
468
|
+
@objc deinit
|
|
469
|
+
}
|
|
470
|
+
public enum ShortKitError : Swift.Error, Swift.Sendable {
|
|
471
|
+
case networkError(underlying: any Swift.Error)
|
|
472
|
+
case playbackError(code: Swift.String, message: Swift.String)
|
|
473
|
+
case authError
|
|
474
|
+
}
|
|
475
|
+
extension ShortKitSDK.ShortKitError : Swift.CustomStringConvertible {
|
|
476
|
+
public var description: Swift.String {
|
|
477
|
+
get
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
public struct SurveyItem : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
481
|
+
public let id: Swift.String
|
|
482
|
+
public let question: Swift.String
|
|
483
|
+
public let options: [ShortKitSDK.SurveyOption]
|
|
484
|
+
public let autoAdvanceDelay: Swift.Double?
|
|
485
|
+
public static func == (a: ShortKitSDK.SurveyItem, b: ShortKitSDK.SurveyItem) -> Swift.Bool
|
|
486
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
487
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
488
|
+
}
|
|
489
|
+
public struct SurveyOption : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
490
|
+
public let id: Swift.String
|
|
491
|
+
public let text: Swift.String
|
|
492
|
+
public static func == (a: ShortKitSDK.SurveyOption, b: ShortKitSDK.SurveyOption) -> Swift.Bool
|
|
493
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
494
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
495
|
+
}
|
|
496
|
+
public struct VTTCue : Swift.Equatable, Swift.Sendable {
|
|
497
|
+
public let startTime: Swift.Double
|
|
498
|
+
public let endTime: Swift.Double
|
|
499
|
+
public let text: Swift.String
|
|
500
|
+
public init(startTime: Swift.Double, endTime: Swift.Double, text: Swift.String)
|
|
501
|
+
public static func == (a: ShortKitSDK.VTTCue, b: ShortKitSDK.VTTCue) -> Swift.Bool
|
|
502
|
+
}
|
|
503
|
+
public protocol AdOverlay : AnyObject {
|
|
504
|
+
func configure(with content: ShortKitSDK.NativeAdContent)
|
|
505
|
+
func resetState()
|
|
506
|
+
func fadeOutForTransition()
|
|
507
|
+
func restoreFromTransition()
|
|
508
|
+
}
|
|
509
|
+
public protocol CarouselOverlay : AnyObject {
|
|
510
|
+
func configure(with item: ShortKitSDK.ImageCarouselItem)
|
|
511
|
+
func resetState()
|
|
512
|
+
func fadeOutForTransition()
|
|
513
|
+
func restoreFromTransition()
|
|
514
|
+
}
|
|
515
|
+
public protocol FeedOverlay : AnyObject {
|
|
516
|
+
func attach(player: ShortKitSDK.ShortKitPlayer)
|
|
517
|
+
func configure(with item: ShortKitSDK.ContentItem)
|
|
518
|
+
func resetPlaybackProgress()
|
|
519
|
+
func activatePlayback()
|
|
520
|
+
func fadeOutForTransition()
|
|
521
|
+
func restoreFromTransition()
|
|
522
|
+
}
|
|
523
|
+
public protocol SurveyOverlay : AnyObject {
|
|
524
|
+
var onSurveyResponse: ((Swift.String, ShortKitSDK.SurveyOption) -> Swift.Void)? { get set }
|
|
525
|
+
var onAutoAdvance: (() -> Swift.Void)? { get set }
|
|
526
|
+
func configure(with item: ShortKitSDK.SurveyItem)
|
|
527
|
+
func resetState()
|
|
528
|
+
func fadeOutForTransition()
|
|
529
|
+
func restoreFromTransition()
|
|
530
|
+
}
|
|
531
|
+
public struct PlayerTime : Swift.Equatable, Swift.Sendable {
|
|
532
|
+
public let current: Swift.Double
|
|
533
|
+
public let duration: Swift.Double
|
|
534
|
+
public let buffered: Swift.Double
|
|
535
|
+
public static func == (a: ShortKitSDK.PlayerTime, b: ShortKitSDK.PlayerTime) -> Swift.Bool
|
|
536
|
+
}
|
|
537
|
+
public enum PlayerState : Swift.Equatable, Swift.Sendable {
|
|
538
|
+
case idle
|
|
539
|
+
case loading
|
|
540
|
+
case ready
|
|
541
|
+
case playing
|
|
542
|
+
case paused
|
|
543
|
+
case seeking
|
|
544
|
+
case buffering
|
|
545
|
+
case ended
|
|
546
|
+
case error(Swift.String)
|
|
547
|
+
public static func == (a: ShortKitSDK.PlayerState, b: ShortKitSDK.PlayerState) -> Swift.Bool
|
|
548
|
+
}
|
|
549
|
+
public struct LoopEvent : Swift.Equatable, Swift.Sendable {
|
|
550
|
+
public let contentId: Swift.String
|
|
551
|
+
public let loopCount: Swift.Int
|
|
552
|
+
public static func == (a: ShortKitSDK.LoopEvent, b: ShortKitSDK.LoopEvent) -> Swift.Bool
|
|
553
|
+
}
|
|
554
|
+
public struct FeedTransitionEvent : Swift.Equatable, Swift.Sendable {
|
|
555
|
+
public enum Phase : Swift.Sendable {
|
|
556
|
+
case began, ended
|
|
557
|
+
public static func == (a: ShortKitSDK.FeedTransitionEvent.Phase, b: ShortKitSDK.FeedTransitionEvent.Phase) -> Swift.Bool
|
|
558
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
559
|
+
public var hashValue: Swift.Int {
|
|
560
|
+
get
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
public enum Direction : Swift.Sendable {
|
|
564
|
+
case forward, backward
|
|
565
|
+
public static func == (a: ShortKitSDK.FeedTransitionEvent.Direction, b: ShortKitSDK.FeedTransitionEvent.Direction) -> Swift.Bool
|
|
566
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
567
|
+
public var hashValue: Swift.Int {
|
|
568
|
+
get
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
public let phase: ShortKitSDK.FeedTransitionEvent.Phase
|
|
572
|
+
public let from: ShortKitSDK.ContentItem?
|
|
573
|
+
public let to: ShortKitSDK.ContentItem?
|
|
574
|
+
public let direction: ShortKitSDK.FeedTransitionEvent.Direction
|
|
575
|
+
public static func == (a: ShortKitSDK.FeedTransitionEvent, b: ShortKitSDK.FeedTransitionEvent) -> Swift.Bool
|
|
576
|
+
}
|
|
577
|
+
public struct FormatChangeEvent : Swift.Equatable, Swift.Sendable {
|
|
578
|
+
public let contentId: Swift.String
|
|
579
|
+
public let fromBitrate: Swift.Int
|
|
580
|
+
public let toBitrate: Swift.Int
|
|
581
|
+
public let fromResolution: Swift.String
|
|
582
|
+
public let toResolution: Swift.String
|
|
583
|
+
public static func == (a: ShortKitSDK.FormatChangeEvent, b: ShortKitSDK.FormatChangeEvent) -> Swift.Bool
|
|
584
|
+
}
|
|
585
|
+
public enum ContentSignal : Swift.Equatable, Swift.Sendable {
|
|
586
|
+
case positive
|
|
587
|
+
case negative
|
|
588
|
+
public static func == (a: ShortKitSDK.ContentSignal, b: ShortKitSDK.ContentSignal) -> Swift.Bool
|
|
589
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
590
|
+
public var hashValue: Swift.Int {
|
|
591
|
+
get
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
@_hasMissingDesignatedInitializers final public class ShortKitPlayer {
|
|
595
|
+
final public var time: Combine.AnyPublisher<ShortKitSDK.PlayerTime, Swift.Never> {
|
|
596
|
+
get
|
|
597
|
+
}
|
|
598
|
+
final public var playerState: Combine.AnyPublisher<ShortKitSDK.PlayerState, Swift.Never> {
|
|
599
|
+
get
|
|
600
|
+
}
|
|
601
|
+
final public var currentItem: Combine.AnyPublisher<ShortKitSDK.ContentItem?, Swift.Never> {
|
|
602
|
+
get
|
|
603
|
+
}
|
|
604
|
+
final public var didLoop: Combine.AnyPublisher<ShortKitSDK.LoopEvent, Swift.Never> {
|
|
605
|
+
get
|
|
606
|
+
}
|
|
607
|
+
final public var feedTransition: Combine.AnyPublisher<ShortKitSDK.FeedTransitionEvent, Swift.Never> {
|
|
608
|
+
get
|
|
609
|
+
}
|
|
610
|
+
final public var formatChange: Combine.AnyPublisher<ShortKitSDK.FormatChangeEvent, Swift.Never> {
|
|
611
|
+
get
|
|
612
|
+
}
|
|
613
|
+
final public var isMuted: Combine.AnyPublisher<Swift.Bool, Swift.Never> {
|
|
614
|
+
get
|
|
615
|
+
}
|
|
616
|
+
final public var playbackRate: Combine.AnyPublisher<Swift.Float, Swift.Never> {
|
|
617
|
+
get
|
|
618
|
+
}
|
|
619
|
+
final public var captionsEnabled: Combine.AnyPublisher<Swift.Bool, Swift.Never> {
|
|
620
|
+
get
|
|
621
|
+
}
|
|
622
|
+
final public var activeCaptionTrack: Combine.AnyPublisher<ShortKitSDK.CaptionTrack?, Swift.Never> {
|
|
623
|
+
get
|
|
624
|
+
}
|
|
625
|
+
final public var activeCue: Combine.AnyPublisher<ShortKitSDK.VTTCue?, Swift.Never> {
|
|
626
|
+
get
|
|
627
|
+
}
|
|
628
|
+
final public var prefetchedAheadCount: Combine.AnyPublisher<Swift.Int, Swift.Never> {
|
|
629
|
+
get
|
|
630
|
+
}
|
|
631
|
+
final public var remainingContentCount: Combine.AnyPublisher<Swift.Int, Swift.Never> {
|
|
632
|
+
get
|
|
633
|
+
}
|
|
634
|
+
final public var currentItemValue: ShortKitSDK.ContentItem? {
|
|
635
|
+
get
|
|
636
|
+
}
|
|
637
|
+
final public var playbackRateValue: Swift.Float {
|
|
638
|
+
get
|
|
639
|
+
}
|
|
640
|
+
final public func play()
|
|
641
|
+
final public func pause()
|
|
642
|
+
final public func seek(to seconds: Swift.Double)
|
|
643
|
+
final public func seekAndPlay(to seconds: Swift.Double)
|
|
644
|
+
final public func setMuted(_ muted: Swift.Bool)
|
|
645
|
+
final public func skipToNext()
|
|
646
|
+
final public func skipToPrevious()
|
|
647
|
+
final public func setPlaybackRate(_ rate: Swift.Float)
|
|
648
|
+
final public func sendContentSignal(_ signal: ShortKitSDK.ContentSignal)
|
|
649
|
+
final public func setMaxBitrate(_ bps: Swift.Int)
|
|
650
|
+
final public func setCaptionsEnabled(_ enabled: Swift.Bool)
|
|
651
|
+
final public func selectCaptionTrack(language: Swift.String)
|
|
652
|
+
final public func seekThumbnail(at time: Swift.Double) -> UIKit.UIImage?
|
|
653
|
+
@objc deinit
|
|
654
|
+
}
|
|
655
|
+
public struct StoryboardTile : Swift.Decodable {
|
|
656
|
+
public let start: Swift.Double
|
|
657
|
+
public let x: Swift.Int
|
|
658
|
+
public let y: Swift.Int
|
|
659
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
660
|
+
}
|
|
661
|
+
public struct StoryboardMetadata : Swift.Decodable {
|
|
662
|
+
public let url: Swift.String
|
|
663
|
+
public let tileWidth: Swift.Int
|
|
664
|
+
public let tileHeight: Swift.Int
|
|
665
|
+
public let duration: Swift.Double
|
|
666
|
+
public let tiles: [ShortKitSDK.StoryboardTile]
|
|
667
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
668
|
+
}
|
|
669
|
+
public struct CachedStoryboard {
|
|
670
|
+
public let metadata: ShortKitSDK.StoryboardMetadata
|
|
671
|
+
public let spriteSheet: UIKit.UIImage
|
|
672
|
+
}
|
|
673
|
+
@_hasMissingDesignatedInitializers final public class StoryboardProvider {
|
|
674
|
+
public static let shared: ShortKitSDK.StoryboardProvider
|
|
675
|
+
public static func extractPlaybackId(from thumbnailUrl: Swift.String) -> Swift.String?
|
|
676
|
+
final public func cached(for playbackId: Swift.String) -> ShortKitSDK.CachedStoryboard?
|
|
677
|
+
final public func fetch(playbackId: Swift.String) async -> ShortKitSDK.CachedStoryboard?
|
|
678
|
+
final public func tile(from storyboard: ShortKitSDK.CachedStoryboard, at seekTime: Swift.Double) -> UIKit.UIImage?
|
|
679
|
+
final public func clearCache()
|
|
680
|
+
@objc deinit
|
|
681
|
+
}
|
|
682
|
+
public enum VTTParser {
|
|
683
|
+
public static func parse(_ text: Swift.String) -> [ShortKitSDK.VTTCue]
|
|
684
|
+
public static func load(from url: Foundation.URL) async throws -> [ShortKitSDK.VTTCue]
|
|
685
|
+
public static func activeCue(in cues: [ShortKitSDK.VTTCue], at time: Swift.Double) -> ShortKitSDK.VTTCue?
|
|
686
|
+
}
|
|
687
|
+
public enum ShortKitVersion {
|
|
688
|
+
public static let current: Swift.String
|
|
689
|
+
}
|
|
690
|
+
final public class ShortKit {
|
|
691
|
+
final public let player: ShortKitSDK.ShortKitPlayer
|
|
692
|
+
weak final public var delegate: (any ShortKitSDK.ShortKitDelegate)?
|
|
693
|
+
public init(apiKey: Swift.String, config: ShortKitSDK.FeedConfig, embedId: Swift.String? = nil, userId: Swift.String? = nil, adProvider: (any ShortKitSDK.ShortKitAdProvider)? = nil, clientAppName: Swift.String? = nil, clientAppVersion: Swift.String? = nil, customDimensions: [Swift.String : Swift.String]? = nil, feedItems: [ShortKitSDK.CustomFeedItem]? = nil)
|
|
694
|
+
final public func fetchContent(limit: Swift.Int = 10) async throws -> [ShortKitSDK.ContentItem]
|
|
695
|
+
final public func setUserId(_ id: Swift.String)
|
|
696
|
+
final public func clearUserId()
|
|
697
|
+
@_Concurrency.MainActor final public func setFeedItems(_ items: [ShortKitSDK.CustomFeedItem])
|
|
698
|
+
@_Concurrency.MainActor final public func appendFeedItems(_ items: [ShortKitSDK.CustomFeedItem])
|
|
699
|
+
@_Concurrency.MainActor final public func setColdStartQueue(_ items: [ShortKitSDK.CustomFeedItem])
|
|
700
|
+
final public func clearColdStartCache()
|
|
701
|
+
@objc deinit
|
|
702
|
+
}
|
|
703
|
+
public enum PlayerClickAction : Swift.Sendable {
|
|
704
|
+
case feed
|
|
705
|
+
case mute
|
|
706
|
+
case none
|
|
707
|
+
public static func == (a: ShortKitSDK.PlayerClickAction, b: ShortKitSDK.PlayerClickAction) -> Swift.Bool
|
|
708
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
709
|
+
public var hashValue: Swift.Int {
|
|
710
|
+
get
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
public struct PlayerConfig {
|
|
714
|
+
public var cornerRadius: CoreFoundation.CGFloat
|
|
715
|
+
public var clickAction: ShortKitSDK.PlayerClickAction
|
|
716
|
+
public var autoplay: Swift.Bool
|
|
717
|
+
public var loop: Swift.Bool
|
|
718
|
+
public var muteOnStart: Swift.Bool
|
|
719
|
+
public var videoOverlay: ShortKitSDK.VideoOverlayMode
|
|
720
|
+
public init(cornerRadius: CoreFoundation.CGFloat = 12, clickAction: ShortKitSDK.PlayerClickAction = .feed, autoplay: Swift.Bool = true, loop: Swift.Bool = true, muteOnStart: Swift.Bool = true, videoOverlay: ShortKitSDK.VideoOverlayMode = .none)
|
|
721
|
+
}
|
|
722
|
+
@_Concurrency.MainActor @preconcurrency public struct ShortKitPlayerView : SwiftUI.UIViewControllerRepresentable {
|
|
723
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.PlayerConfig = PlayerConfig())
|
|
724
|
+
@_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: ShortKitSDK.ShortKitPlayerView.Context) -> ShortKitSDK.ShortKitPlayerViewController
|
|
725
|
+
@_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: ShortKitSDK.ShortKitPlayerViewController, context: ShortKitSDK.ShortKitPlayerView.Context)
|
|
726
|
+
public typealias Body = Swift.Never
|
|
727
|
+
public typealias Coordinator = Swift.Void
|
|
728
|
+
public typealias UIViewControllerType = ShortKitSDK.ShortKitPlayerViewController
|
|
729
|
+
}
|
|
730
|
+
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency final public class ShortKitPlayerViewController : UIKit.UIViewController {
|
|
731
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.PlayerConfig)
|
|
732
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func viewDidLoad()
|
|
733
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func viewWillDisappear(_ animated: Swift.Bool)
|
|
734
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func viewDidLayoutSubviews()
|
|
735
|
+
@_Concurrency.MainActor @preconcurrency final public func configure(with contentItem: ShortKitSDK.ContentItem)
|
|
736
|
+
@_Concurrency.MainActor @preconcurrency final public func activate()
|
|
737
|
+
@_Concurrency.MainActor @preconcurrency final public func deactivate()
|
|
738
|
+
@objc deinit
|
|
739
|
+
}
|
|
740
|
+
extension ShortKitSDK.ShortKitPlayerViewController : UIKit.UIViewControllerTransitioningDelegate {
|
|
741
|
+
@_Concurrency.MainActor @preconcurrency @objc final public func animationController(forPresented presented: UIKit.UIViewController, presenting: UIKit.UIViewController, source: UIKit.UIViewController) -> (any UIKit.UIViewControllerAnimatedTransitioning)?
|
|
742
|
+
@_Concurrency.MainActor @preconcurrency @objc final public func animationController(forDismissed dismissed: UIKit.UIViewController) -> (any UIKit.UIViewControllerAnimatedTransitioning)?
|
|
743
|
+
}
|
|
744
|
+
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency final public class ShortKitWidgetViewController : UIKit.UIViewController {
|
|
745
|
+
@_Concurrency.MainActor @preconcurrency public init(shortKit: ShortKitSDK.ShortKit, config: ShortKitSDK.WidgetConfig)
|
|
746
|
+
@_Concurrency.MainActor @preconcurrency final public func configure(with items: [ShortKitSDK.ContentItem])
|
|
747
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func viewDidLoad()
|
|
748
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func viewDidAppear(_ animated: Swift.Bool)
|
|
749
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func viewWillDisappear(_ animated: Swift.Bool)
|
|
750
|
+
@objc deinit
|
|
751
|
+
}
|
|
752
|
+
extension ShortKitSDK.ShortKitWidgetViewController : UIKit.UICollectionViewDataSource {
|
|
753
|
+
@_Concurrency.MainActor @preconcurrency @objc final public func collectionView(_ collectionView: UIKit.UICollectionView, numberOfItemsInSection section: Swift.Int) -> Swift.Int
|
|
754
|
+
@_Concurrency.MainActor @preconcurrency @objc final public func collectionView(_ collectionView: UIKit.UICollectionView, cellForItemAt indexPath: Foundation.IndexPath) -> UIKit.UICollectionViewCell
|
|
755
|
+
}
|
|
756
|
+
extension ShortKitSDK.ShortKitWidgetViewController : UIKit.UICollectionViewDelegate {
|
|
757
|
+
@_Concurrency.MainActor @preconcurrency @objc final public func collectionView(_ collectionView: UIKit.UICollectionView, didSelectItemAt indexPath: Foundation.IndexPath)
|
|
758
|
+
}
|
|
759
|
+
extension ShortKitSDK.ShortKitWidgetViewController : UIKit.UIViewControllerTransitioningDelegate {
|
|
760
|
+
@_Concurrency.MainActor @preconcurrency @objc final public func animationController(forPresented presented: UIKit.UIViewController, presenting: UIKit.UIViewController, source: UIKit.UIViewController) -> (any UIKit.UIViewControllerAnimatedTransitioning)?
|
|
761
|
+
@_Concurrency.MainActor @preconcurrency @objc final public func animationController(forDismissed dismissed: UIKit.UIViewController) -> (any UIKit.UIViewControllerAnimatedTransitioning)?
|
|
762
|
+
}
|
|
763
|
+
public struct WidgetConfig {
|
|
764
|
+
public var cardCount: Swift.Int
|
|
765
|
+
public var cardSpacing: CoreFoundation.CGFloat
|
|
766
|
+
public var cornerRadius: CoreFoundation.CGFloat
|
|
767
|
+
public var autoplay: Swift.Bool
|
|
768
|
+
public var muteOnStart: Swift.Bool
|
|
769
|
+
public var loop: Swift.Bool
|
|
770
|
+
public var rotationInterval: Foundation.TimeInterval
|
|
771
|
+
public var clickAction: ShortKitSDK.PlayerClickAction
|
|
772
|
+
public var cardOverlay: ShortKitSDK.VideoOverlayMode
|
|
773
|
+
public init(cardCount: Swift.Int = 3, cardSpacing: CoreFoundation.CGFloat = 8, cornerRadius: CoreFoundation.CGFloat = 12, autoplay: Swift.Bool = true, muteOnStart: Swift.Bool = true, loop: Swift.Bool = true, rotationInterval: Foundation.TimeInterval = 10, clickAction: ShortKitSDK.PlayerClickAction = .feed, cardOverlay: ShortKitSDK.VideoOverlayMode = .none)
|
|
774
|
+
}
|
|
775
|
+
extension ShortKitSDK.AdQuartile : Swift.Equatable {}
|
|
776
|
+
extension ShortKitSDK.AdQuartile : Swift.Hashable {}
|
|
777
|
+
extension ShortKitSDK.FeedSource : Swift.Hashable {}
|
|
778
|
+
extension ShortKitSDK.FeedSource : Swift.RawRepresentable {}
|
|
779
|
+
extension ShortKitSDK.ShortKitFeedView : Swift.Sendable {}
|
|
780
|
+
extension ShortKitSDK.CaptionSource : Swift.Equatable {}
|
|
781
|
+
extension ShortKitSDK.CaptionSource : Swift.Hashable {}
|
|
782
|
+
extension ShortKitSDK.CaptionSource : Swift.RawRepresentable {}
|
|
783
|
+
extension ShortKitSDK.FeedTransitionEvent.Phase : Swift.Equatable {}
|
|
784
|
+
extension ShortKitSDK.FeedTransitionEvent.Phase : Swift.Hashable {}
|
|
785
|
+
extension ShortKitSDK.FeedTransitionEvent.Direction : Swift.Equatable {}
|
|
786
|
+
extension ShortKitSDK.FeedTransitionEvent.Direction : Swift.Hashable {}
|
|
787
|
+
extension ShortKitSDK.ContentSignal : Swift.Hashable {}
|
|
788
|
+
extension ShortKitSDK.PlayerClickAction : Swift.Equatable {}
|
|
789
|
+
extension ShortKitSDK.PlayerClickAction : Swift.Hashable {}
|
|
790
|
+
extension ShortKitSDK.ShortKitPlayerView : Swift.Sendable {}
|