import { VeLivePlayerLogLevel, VeLivePlayerType, VeLivePlayerConfiguration, VeLivePlayerFillMode, VeLivePlayerStreamData, VeLivePlayerResolution, VeLivePlayerRotation, VeLivePlayerMirror, VeLivePlayerPixelFormat, VeLivePlayerVideoBufferType } from './keytype'; import { NSString, id, float, BOOL, NSDictionary, int } from './types'; import { VeLivePlayerObserver } from './callback'; import { UIView } from './external'; export declare class TVLManager { /** {en} * @detail api * @brief Sets the level of the output log. * @param logLevel The level of the output log. For details, see VeLivePlayerLogLevel{@link #VeLivePlayerLogLevel}. * @order 5 */ static setLogLevel(logLevel: VeLivePlayerLogLevel): void; /** {en} * @detail api * @brief Gets the version number of the Player SDK. * @return
* The version number of the Player SDK. * @order 4 */ static getVersion(): NSString; /** {en} * @detail keytype * @brief The player observer. */ observer: id; /** {en} * @detail keytype * @brief The view used by the player to render video. Add `playerView` to the view hierarchy of your app to display the video content. */ playerView: UIView; /** {en} * @detail keytype * @brief The player volume. The default value is `1.0`. The value range is [0.0, 1.0]. */ volume: float; /** {en} * @detail keytype * @brief Checks whether the player is playing. * @return Whether the player is playing.
* - YES: The player is playing; * - NO: The player is not playing. */ isPlaying: BOOL; /** {en} * @detail api * @brief Initializes the player. * @order 9 */ init(): this; /** {en} * @brief Initializes the specified type of player. * @param type The player type. Refer to [VeLivePlayerType](docs-player-sdk-for-ios-type-definition#VeLivePlayerType) for details. */ initWithType(type: VeLivePlayerType): this; /** {en} * @detail api * @brief Configures player settings, including whether to turn on SEI messaging, hardware decoding, and local DNS prefetch. * @notes
* Call this method before calling play{@link #VeLivePlayer#play}. * @param config Player configurations. Refer to VeLivePlayerConfiguration{@link #VeLivePlayerConfiguration} for details. * @order 1 */ setConfig(config: VeLivePlayerConfiguration): void; /** {en} * @detail api * @brief Sets the player observer to listen to the VeLivePlayer's events, such as playback errors or status updates, rendering of the first audio and video frame, and resolution switching. * @notes
* Call this method before calling play{@link #VeLivePlayer#play}. * @param observer The player observer. See VeLivePlayerObserver{@link #VeLivePlayerObserver} for details. * @order 2 */ setObserver(observer: id): void; /** {en} * @detail api * @brief Sets the fill mode of the player screen. * @notes * - Call this method before calling [play](#TVLManager(VeLivePlayer)-play) to set the initial fill mode of the player. * - You can call this method during playback to dynamically adjust the fill mode. * @order 3 * @param fillMode The fill mode of SurfaceView. The default value is `VeLivePlayerFillModeAspectFill`. See VeLivePlayerFillMode{@link #VeLivePlayerFillMode} for details. */ setRenderFillMode(fillMode: VeLivePlayerFillMode): Promise; /** {en} * @detail api * @brief Sets a pull stream address. * @notes * Call this method before calling [play](#TVLManager(VeLivePlayer)-play). * @order 6 * @param url The pull stream address. */ setPlayUrl(url: NSString): void; /** {en} * @detail api * @brief Sets the mapping of domain names to server IP addresses. * @param hostIpMap The mapping of domain names to server IP addresses. The `Map` object uses the domain name as the key, and the corresponding value is a list of IP addresses for the servers associated with that domain. The value is of the `List` type. * @order 17 */ setUrlHostIP(hostIpMap: NSDictionary): void; /** {en} * @detail api * @brief Configures advanced settings for the player, including offscreen rendering, maximum buffer duration, and adaptive bitrate (ABR) algorithms. [Create a ticket](https://console.byteplus.com/workorder/create?step=2&SubProductID=P00000980) to contact BytePlus technical support if you need further information. * @param key The parameter name of the advanced setting. * @param value The parameter value of the advanced setting. * @order 18 */ setProperty(key: NSString, value: id): void; /** {en} * @detail api * @brief Sets multiple live streams. Call this method if you need to enable features requiring multiple live streams, such as adaptive bitrate (ABR), manual resolution switching, and primary and backup streams. * @param streamData Configurations for multiple pull stream addresses. See VeLivePlayerStreamData{@link #VeLivePlayerStreamData} for details. * @notes
* Call this method before calling play{@link #VeLivePlayer#play}. * @order 7 */ setPlayStreamData(streamData: VeLivePlayerStreamData): void; /** {en} * @detail api * @brief Starts or resumes playback. * @notes * After you call this method, the [onPlayerStatusUpdate:status:](docs-player-sdk-for-ios-callback#VeLivePlayerObserver-onplayerstatusupdate-status) callback is triggered both when the player finishes preparing for stream pulling and when the first frame is rendered. * @order 10 */ play(): Promise; /** {en} * @detail api * @brief Pauses playback. * @notes * When playback is paused after you call this method, the [onPlayerStatusUpdate:status:](docs-player-sdk-for-ios-callback#VeLivePlayerObserver-onplayerstatusupdate-status) callback is triggered. * @order 11 */ pause(): Promise; /** {en} * @detail api * @brief Stops playback. This method does not destroy the player. * @notes * When playback stops after you call this method, the [onPlayerStatusUpdate:status:](docs-player-sdk-for-ios-callback#VeLivePlayerObserver-onplayerstatusupdate-status) callback is triggered. * @order 12 */ stop(): Promise; /** {en} * @detail api * @brief Stops playback and destroys the player. * @order 13 */ destroy(): void; /** {en} * @brief Check whether the player currently supports the specified resolution level. * @param resolution Resolution levels. For details, please refer to [VeLivePlayerResolution](docs-player-sdk-for-ios-type-definition#VeLivePlayerResolution). * @return - 0: Supported; * - Others: Not supported. For details of other return values, please refer to [VeLivePlayerSupportResolutionSwitchError](docs-player-sdk-for-ios-type-definition#VeLivePlayerSupportResolutionSwitchError). */ isSupportResolutionSwitch(resolution: VeLivePlayerResolution): int; /** {en} * @detail api * @brief Changes the video resolution. * @notes * - Call [setPlayStreamData:](#TVLManager(VeLivePlayer)-setplaystreamdata) to set multiple resolutions before calling this method. * - Once the player switches to the new resolution after you call this method, the [onResolutionSwitch:resolution:error:reason:](docs-player-sdk-for-ios-callback#VeLivePlayerObserver-onresolutionswitch-resolution-error-reason) callback is triggered. * @order 14 * @param resolution The video resolution. See VeLivePlayerResolution{@link #VeLivePlayerResolution} for details. * @return
* - YES: Success; * - NO: Failure. */ switchResolution(resolution: VeLivePlayerResolution): void; /** {en} * @detail api * @brief Sets whether to mute playback. * @param mute Whether to mute playback. The default value is `NO`.
* - YES: Mute; * - NO: Do not mute. * @order 15 */ setMute(mute: BOOL): void; /** {en} * @detail api * @brief Checks whether playback is muted. * @return Whether playback is muted.
* - YES: Muted; * - NO: Not muted. * @order 16 */ isMute(): BOOL; /** {en} * @detail api * @brief Sets the clockwise rotation angle of the video. * @param rotation The clockwise rotation angle of the video. Rotation is disabled by default. See VeLivePlayerRotation{@link #VeLivePlayerRotation} for details. * @notes
* - You can change the rotation angle before and during playback. * - Each time this method is called, the player rotates the video based on the original video. * - When you apply both rotation and mirroring to the video, the player will mirror the video and then rotate it. * @order 23 */ setRenderRotation(rotation: VeLivePlayerRotation): Promise; /** {en} * @detail api * @brief Configures mirroring settings. * @param mirror Mirroring settings. Mirroring is disabled by default. See VeLivePlayerMirror{@link #VeLivePlayerMirror} for details. * @notes
* - You can change the mirroring settings before and during playback. * - Each time this method is called, the player applies the mirroring settings to the original video. * - When you apply both rotation and mirroring to the video, the player will mirror the video and then rotate it. * @order 24 */ setRenderMirror(mirror: VeLivePlayerMirror): Promise; /** {en} * @detail api * @brief Takes a screenshot of the video. * @notes * - This method only takes effect during playback. * - When a screenshot is captured after you call this method, the [onSnapshotComplete:image:](docs-player-sdk-for-ios-callback#VeLivePlayerObserver-onsnapshotcomplete-image) callback is triggered containing the `UIImage` object of the screenshot. * @order 19 * @return * - 0: Screenshot capturing is allowed; * - VeLivePlayerErrorRefused{@link #VeLivePlayerErrorCode#VeLivePlayerErrorRefused}: Screenshot capturing is not allowed. */ snapshot(): int; /** {en} * @detail api * @brief Sets the video frame observer. * @notes * - You can call this method to subscribe to decoded video data for external rendering. * - After you call this method, the onRenderVideoFrame:videoFrame:is triggered once the SDK receives a video frame. The callback contains detailed information of the video frame. * - If you use external rendering, you need to make sure the video and audio are synchronized. * @order 20 * @param enable Whether to enable the video frame callback. The default value is `NO`.
* - YES: Enable; * - NO: Disable. * @param pixelFormat The pixel format of the video frame in the callback. See VeLivePlayerPixelFormat{@link #VeLivePlayerPixelFormat} for details. * @param bufferType The encapsulation format of the video data in the callback. See VeLivePlayerVideoBufferType{@link #VeLivePlayerVideoBufferType} for details. */ enableVideoFrameObserver(enable: BOOL, pixelFormat: VeLivePlayerPixelFormat, bufferType: VeLivePlayerVideoBufferType): void; /** {en} * @detail api * @brief Sets the audio frame observer. * @notes * - You can call this method to subscribe to decoded audio data for external rendering. * - After you call this method, the [onRenderAudioFrame:audioFrame:](docs-player-sdk-for-ios-callback#VeLivePlayerObserver-onrenderaudioframe-audioframe) callback is triggered once the SDK receives a audio frame. The callback contains detailed information of the audio frame. * - If you use external rendering, you need to make sure the video and audio are synchronized. * @order 21 * @param enable Whether to enable the audio frame callback. The default value is `NO`.
* - YES: Enable; * - NO: Disable. * @param enableRendering Whether to enable player rendering. The default value is `NO`.
* - YES: Enable; * - NO: Disable. */ enableAudioFrameObserver(enable: BOOL, enableRendering: BOOL): void; /** {en} * @detail api * @brief Enables or disables super resolution. * @notes * - Call this method after receiving the onFirstVideoFrameRender:isFirstFrame:callback, or during playback. * - Support calling this method during playback to turn on or off super-resolution. * - If the SDK fails to enable super resolution due to device model, video resolution or frame rate, you will receive the [onStreamFailedOpenSuperResolution:error:](docs-player-sdk-for-ios-callback#VeLivePlayerObserver-onstreamfailedopensuperresolution-error). * @order 22 * @param enable Whether to enable super resolution. The default value is NO. * - YES: Turn on; * - NO: Turn off. */ setEnableSuperResolution(enable: BOOL): void; setVolume(volume: float): void; setEnableIgnoreAudioInterruption(enable: BOOL): void; setAllowsVideoRendering(enable: BOOL): void; addExtraHttpRequestHeadersByUser(headers: NSDictionary): void; }