import { BOOL, NSString, NSArray, id, NSInteger, CGRect, int64_t, CGFloat, NSTimeInterval, dispatch_queue_t, CVPixelBufferRef, UIImage, NSDictionary, NSUInteger, double, NSError, NSNumber } from './types'; import { TTVideoEngineStrategyType, TTVideoEngineStrategyPreloadConfig, TTVideoEngineMediaSource, TTVideoEngineLocalServerConfigure, TTVideoEnginePreloaderURLItem, TTVideoEnginePreloaderVidItem, TTVideoEngineLocalServerCacheInfo, TTVideoEngineState, TTVideoEnginePlaybackState, TTVideoEngineLoadState, TTVideoEngineStallReason, TTVideoEngineResolutionType, TTVideoEngineSubDecInfoProtocol, TTVideoEngineSubModel, TTVideoEngineSubProtocol, TTVideoEngineSubInfo, TTVideoEngineEncodeType, TTVideoEngineDownloadState, TTVideoEngineModel } from './keytype'; import { TTVideoEnginePreRenderDelegate, TTVideoEngineDelegate, TTVideoEngineResolutionDelegate, TTVideoEngineAutoSelectDelegate, TTVideoEngineSubtitleDelegate, TTVideoEngineDownloaderDelegate } from './callback'; import { UIView } from './external'; export declare class TTVideoEngine { static setLogFlag(flag: number): void; static isSupportMetal(): BOOL; static isSupportH266(): BOOL; static getEngineUniqueId(): Promise; static enableEngineStrategy(strategyType: TTVideoEngineStrategyType, scene: NSString): BOOL; static enableEnginePreRenderStrategy(scene: NSString): BOOL; static enableEnginePreloadStrategy(preloadConfig: TTVideoEngineStrategyPreloadConfig, scene: NSString): BOOL; static clearAllEngineStrategy(): void; static setStrategyVideoSources(videoSources: NSArray>): void; static addStrategyVideoSources(videoSources: NSArray>): void; static setPreRenderVideoEngineDelegate(delegate: id): void; static getPreRenderVideoEngineWithVideoSource(source: id): TTVideoEngine; static getPreRenderFinishedPlayerViewWithVideoSource(source: id): UIView; static getPreRenderFinishedVideoEngineWithVideoSource(source: id): TTVideoEngine; static startEnginePreloadStrategyWithIndex(startIndex: NSInteger): void; static debugToolIsShowing(): BOOL; static showDebugTool(containerView: UIView, rect: CGRect): Promise; static refreshCurrentVideoEngine(videoEngine: TTVideoEngine): void; static removeDebugTool(): Promise; static ls_localServerConfigure(): TTVideoEngineLocalServerConfigure; static ls_addTaskWithURLItem(urlItem: TTVideoEnginePreloaderURLItem): void; static ls_addTaskWithVidItem(vidItem: TTVideoEnginePreloaderVidItem): void; static ls_cancelTaskByKey(key: NSString): void; static ls_cancelTaskByVideoId(vid: NSString): void; static ls_cancelAllTasks(): void; static ls_cancelAllIdlePreloadTasks(): void; static ls_clearAllCaches(force: BOOL): void; static ls_removeFileCacheByKey(key: NSString): void; static ls_getAllCacheSize(): int64_t; static ls_getAllCacheSizeWithCompletion(block: (cacheSize: int64_t) => void): void; static ls_getCacheSizeByKey(key: NSString, result: (size: int64_t) => void): void; static ls_getCacheFileInfoByKey(key: NSString): TTVideoEngineLocalServerCacheInfo; static getEngineUniqueKek(): NSString; delegate: id; resolutionDelegate: id; autoSelectDelegate: id; failPlayOffline: BOOL; playbackSpeed: CGFloat; volume: CGFloat; muted: BOOL; radioMode: BOOL; hardwareDecode: BOOL; looping: BOOL; playerView: UIView; duration: NSTimeInterval; playableDuration: NSTimeInterval; durationWatched: NSTimeInterval; state: TTVideoEngineState; playbackState: TTVideoEnginePlaybackState; loadState: TTVideoEngineLoadState; stallReason: TTVideoEngineStallReason; currentResolution: TTVideoEngineResolutionType; subtitleDelegate: id; subDecInfoModel: id; initWithOwnPlayer(isOwnPlayer: BOOL): Promise; setSubtitleAuthToken(auth: NSString): void; setCustomHeaderValue(value: NSString, key: NSString): void; setLocalURL(url: NSString): void; setBarrageMaskURL(url: NSString, fileHash: NSString): void; prepareToPlay(): void; play(): Promise; pause(): void; stop(): void; close(): void; closeAysnc(): void; setCurrentPlaybackTime(currentPlaybackTime: NSTimeInterval, finised: (success: boolean) => void): void; addPeriodicTimeObserverForInterval(interval: NSTimeInterval, queue: dispatch_queue_t, block: () => void): void; removeTimeObserver(): void; supportedResolutionTypes(): any; supportedQualityInfos(): NSArray; configResolution(resolution: TTVideoEngineResolutionType): BOOL; videoSizeForType(type: TTVideoEngineResolutionType): NSInteger; copyPixelBuffer(): CVPixelBufferRef; isSupportHDR(): BOOL; isSupportSR(): BOOL; snapshot(completion: (arg0: UIImage) => void): void; setOptionForKey(key: number, value: id): Promise; getOptionBykey(key: number): any; currentPlaybackTime(): NSTimeInterval; init(): this; setVideoEngineVideoSource(source: id): void; getVideoEngineStrategyUniqueId(): NSString; subtitleIDs(): NSArray; subtitleDescriptions(): TTVideoEngineSubModel; requestedSubtitleInfo(): NSDictionary; subtitleInfos(): NSArray; hasEmbeddedSubtitle(): BOOL; switchNewSubtitleModel(subModel: id): void; addNewSubtitleModel(subModel: id): void; getSubtitleInfo(queryTime: NSInteger): TTVideoEngineSubInfo; getPlayerSessionId(): NSString; } export declare class TTVideoEngineDownloader { static shareLoader(): TTVideoEngineDownloader; maxDownloadOperationCount: NSUInteger; limitFreeDiskSize: int64_t; delegate: id; downloadSize(): NSInteger; suspendAllTasks(): void; resumeAllTasks(): void; removeAllTasks(): void; urlTask(urls: NSArray, key: NSString, videoId: NSString): Promise; vidTask_playAuthToken_resolution(videoId: NSString, token: NSString, resolution: TTVideoEngineResolutionType): Promise; vidTask(videoId: NSString, token: NSString, resolution: TTVideoEngineResolutionType, codecType: TTVideoEngineEncodeType): Promise; init(): this; } export declare class TTVideoEngineDownloadTask { taskDescription: NSString; countOfBytesReceived: int64_t; countOfBytesExpectedToReceive: int64_t; progress: double; state: TTVideoEngineDownloadState; error: NSError; availableLocalFilePath: NSString; invalidateAndCancel(): void; suspend(): void; resume(): void; init(): this; } export declare class TTVideoEngineDownloadURLTask extends TTVideoEngineDownloadTask { key: NSString; videoId: NSString; /** * @locale zh * @type api * @brief URL 列表,支持主备 URL。 */ urls: NSArray; updateUrls(urls: NSArray): void; init(): this; } export declare class TTVideoEngineDownloadVidTask extends TTVideoEngineDownloadTask { resolution: TTVideoEngineResolutionType; codecType: TTVideoEngineEncodeType; h265Enable: BOOL; /** * @locale zh * @type api * @brief 视频 ID。 */ videoId: NSString; baseDashEnable: BOOL; httpsEnable: BOOL; resolutionMap: NSDictionary; currentResolution: TTVideoEngineResolutionType; videoModel: TTVideoEngineModel; urlExtendParams: NSDictionary; init(): this; } export declare class TTVideoEngineDirectURLItem { static urlItem(key: NSString, urls: NSArray, urlExpiredTime: NSInteger): TTVideoEngineDirectURLItem; key: NSString; urls: NSArray; videoId: NSString; cacheFilePath: NSString; urlExpiredTime: NSInteger; init(): this; } export declare class TTVideoEnginePreloaderSubtitleVidItem { static subtitleVidItemWithVideoSource(source: id): TTVideoEnginePreloaderSubtitleVidItem; subtitleAuthToken: NSString; preloadSubtitleModelBlock(subModels: NSArray>): TTVideoEngineSubProtocol; init(): this; } export declare class TTVideoEnginePreloaderItem { setCustomHeaderValue(value: NSString, key: NSString): void; init(): this; } export declare class TTVideoEngineHLSProxyDelegate { }