Files
sociology_app/uni_modules/zy-AliyunPlayer/ios/AliyunPlayer.framework/Headers/AVPConfig.h
2024-07-17 14:06:06 +08:00

251 lines
8.2 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// AVPConfig.h
// AliPlayerSDK
//
// Created by shiping.csp on 2018/11/16.
// Copyright © 2018 com.alibaba.AliyunPlayer. All rights reserved.
//
#ifndef AVPConfig_h
#define AVPConfig_h
#import <Foundation/Foundation.h>
OBJC_EXPORT
@interface AVPConfig : NSObject
/**
@brief 直播最大延迟 默认5000毫秒单位毫秒
*/
/****
@brief The maximum broadcasting delay. Default: 5000 milliseconds, Unit: millisecond.
*/
@property (nonatomic, assign) int maxDelayTime;
/**
@brief 卡顿后缓存数据的高水位,当播放器缓存数据大于此值时开始播放,单位毫秒
*/
/****
@brief The size of data to be cached before the player can be resumed from playback lag. When the size of the data cached by the player reaches this value, the playback is resumed, Unit: millisecond.
*/
@property (nonatomic, assign) int highBufferDuration;
/**
@brief 开始起播缓存区数据长度默认500ms单位毫秒
*/
/****
@brief The size of the cache data required for starting playback. Default: 500 milliseconds, Unit: millisecond.
*/
@property (nonatomic, assign) int startBufferDuration;
/**
@brief 播放器最大的缓存数据长度默认50秒单位毫秒
*/
/****
@brief The maximum size of cache data. Default: 50 seconds, Unit: millisecond.
*/
@property (nonatomic, assign) int maxBufferDuration;
/**
@brief 网络超时时间默认15秒单位毫秒
*/
/****
@brief Network connection timeout time. Default: 15 seconds, Unit: millisecond.
*/
@property (nonatomic, assign) int networkTimeout;
/**
@brief 网络重试次数每次间隔networkTimeoutnetworkRetryCount=0则表示不重试重试策略app决定默认值为2
*/
/****
@brief The maximum network reconnection attempts. Default: 2. networkTimeout specifies the reconnection interval. networkRetryCount=0 indicates that automatic network reconnection is disabled. The reconnection policy varies depending on the app.
*/
@property (nonatomic, assign) int networkRetryCount;
/**
@brief probe数据大小默认-1,表示不设置
*/
/****
@brief The size of the probe data. Default: -1. Value -1 indicates that the probe data size is not specified. */
@property (nonatomic, assign) int maxProbeSize;
/**
@brief 请求referer
*/
/****
@brief Request Referer.
*/
@property (nonatomic, copy) NSString *referer;
/**
@brief user Agent
*/
/****
@brief UserAgent.
*/
@property (nonatomic, copy) NSString *userAgent;
/**
@brief httpProxy代理
*/
/****
@brief HTTP proxy.
*/
@property (nonatomic, copy) NSString *httpProxy;
/**
@brief 调用stop停止后是否显示最后一帧图像YES代表清除显示黑屏默认为NO
*/
/****
@brief Whether to clear the last frame when the player is stopped. Set to YES to clear the last frame and a black view is displayed. Default: NO.
*/
@property (nonatomic, assign) BOOL clearShowWhenStop;
/**
@brief 添加自定义header
*/
/****
@brief Add a custom header.
*/
@property (nonatomic, copy) NSMutableArray *httpHeaders;
/**
@brief 是否启用SEI
*/
/****
@brief Enable or disable SEI.
*/
@property (nonatomic, assign) BOOL enableSEI;
/**
@brief 当通过GlobalSettings API打开本地缓存功能后此处可设置当前播放器实例是否允许被缓存默认允许。
*/
/****
@brief When local cached is enabled in GlobalSettings API, this config can be used to enable or disable local cache in current player instance, by default is ON.
*/
@property(nonatomic, assign) BOOL enableLocalCache;
/* set the video format for renderFrame callback
* vtb decoder only, equal to OSType, not be supported by other decoder
* support 420v 420f y420 BGRA
* */
@property (nonatomic, assign) int pixelBufferOutputFormat;
/**
@brief HLS直播时起播分片位置。
*/
/****
@brief The start playing index of fragments, when HLS is live.
*/
@property(nonatomic, assign) int liveStartIndex;
/**
@brief 禁用Audio.
*/
/****
@brief Disable audio track.
*/
@property (nonatomic, assign) BOOL disableAudio;
/**
@brief 禁用Video
*/
/****
@brief Disable video track.
*/
@property (nonatomic, assign) BOOL disableVideo;
/**
@brief 进度跟新的频率。包括当前位置和缓冲位置。
*/
/****
@brief Set the frequencies of Progress. Includes the current position and the buffer position.
*/
@property(nonatomic, assign) int positionTimerIntervalMs;
/**
@brief 设置播放器后向buffer的最大值.
*/
/****
@brief set the maximum backward buffer duration of the player.
*/
@property(nonatomic, assign) uint64_t mMAXBackwardDuration;
/**
@brief 优先保证音频播放在网络带宽不足的情况下优先保障音频的播放目前只在dash直播流中有效视频已经切换到了最低码率
*/
/****
@brief prefer audio playback; prefer audio playback when under insufficient network bandwidth. At present, it is only effective in dash live stream (the video has been switched to the lowest bit rate)
*/
@property (nonatomic, assign) BOOL preferAudio;
/**
@brief 播放器实例是否可以使用http dns进行解析-1 表示跟随全局设置0 disable
*/
/****
@brief whether enable http dns, -1 : as globel setting
*/
@property(nonatomic, assign) int enableHttpDns;
/**
@brief 使用http3进行请求支持标准RFC 9114HTTP3和RFC 9000QUIC v1默认值关。如果http3请求失败自动降级至普通http默认关闭
*/
/****
@brief Use http3 to request, supported standards:RFC 9114(HTTP3) and RFC 9000(QUIC v1), false by default. If request failed, it will automatically downgrade to normal http.
*/
@property(nonatomic, assign) BOOL enableHttp3;
/**
@brief 用于纯音频或纯视频的RTMP/FLV直播流起播优化策略当流的header声明只有音频或只有视频时且实际流的内容跟header声明一致时此选项打开可以达到快速起播的效果。默认关闭
*/
/****
@brief Used to fast stream start when playing pure audio or pure video in RTMP/FLV live stream. If live stream header states only audio or only video and the stream content really contains the same single stream, enable this option can fast start the stream. Default value is false.
*/
@property(nonatomic, assign) BOOL enableStrictFlvHeader;
/**
@brief 针对打开了点播URL鉴权的媒体资源HLS协议开启本地缓存后可选择不同的鉴权模式非严格鉴权(false)鉴权也缓存若上一次只缓存了部分媒体下次播放至非缓存部分时播放器会用缓存的鉴权发起请求如果URL鉴权设置的有效很短的话会导致播放异常。严格鉴权(true)鉴权不缓存每次起播都进行鉴权无网络下会导致起播失败。默认值false。
*/
/****
@brief For media that enabled URL authorization(HLS protocol), when local cache is enabled, we can choose different auth mode:Non Strict Mode(false): Auth is cached. If last play cached part of the media, and next play to non-cache part, player will use old auth to request, which may fail if the auth timeout configuration in the server is very short. Strict Mode(true): Auth is not cached. Every play will do the auth verification, so when there is no network, media cannot be played. Default is false.
*/
@property(nonatomic, assign) BOOL enableStrictAuthMode;
/**
* 允许当前播放器实例进行投屏
* 你需要集成投屏SDK来完成投屏功能
* 默认值关
*/
/****
* Enable projection for current player
* You need to integrate projection SDK to do this
* Default is false.
*/
@property(nonatomic, assign) BOOL enableProjection;
/**
@brief 音频打断模式如接电话期间0 表示打断期间暂停播放打断结束恢复播放1 表示打断期间依然持续播放。默认值0
*/
/****
@brief Audio interrupt mode (such as phone call), 0 means pause play during interruption and resume play after interruption; 1 means continue play during interruption period.
*/
@property(nonatomic, assign) int audioInterruptMode;
/**
* 开始预加载阈值。单位ms
*/
/****
* start preload limit. Unit: milliseconds.
*/
@property(nonatomic, assign) int startBufferLimit;
/**
* 停止预加载阈值。单位ms
*/
/****
* stop preload limit. Unit: milliseconds.
*/
@property(nonatomic, assign) int stopBufferLimit;
@end
#endif /* AVPConfig_h */