#include "AliPlayerGlobalSettings.h"
◆ AdaptiveDecoderGetBackupURLCallback
- (typedef NSString *(* AdaptiveDecoderGetBackupURLCallback) (AVPBizScene oriBizType, AVPCodecType oriCodecType, NSString *oriURL)) |
decoding adaptive downgrade switching backup URL
- Parameters
-
oriBizType | Scenarios of downgrading |
oriCodecType | experiencing downgrade |
oriURL | Original URL |
- Returns
- Backup URL
◆ CaheUrlHashCallback
- (typedef NSString *(* CaheUrlHashCallback) (NSString *url)) |
callback
- Parameters
-
- Returns
- the hash value . Ensure that each URL is different.
◆ NetworkDataProcessCallback
- (typedef BOOL(* NetworkDataProcessCallback) (NSString *requestUrl, const uint8_t *inData, const int64_t inOutSize, uint8_t *outData)) |
A chance for media data downloading from network and modified by app, now only mp4 is supported.
- Parameters
-
requestUrl | data's source URL |
inData | input data buffer |
inOutSize | input/output data buffer size in byte |
outData | output data buffer and its memory is managed by sdk, app can write it but size must not exceed to inOutSize |
- Returns
- whether processed. If processed, return YES and sdk will use outData for later process, otherwise use original data and return NO.
◆ clearCaches
◆ disableCrashUpload:
+ (void) disableCrashUpload: |
|
(BOOL) | disable |
|
whether disable crash upload
- Parameters
-
◆ enableBufferToLocalCache:
+ (void) enableBufferToLocalCache: |
|
(BOOL) | enable |
|
enable buffer to local cache when maxBufferDuration large than 50s.
Default is enabled.
- Parameters
-
◆ enableEnhancedHttpDns:
+ (void) enableEnhancedHttpDns: |
|
(BOOL) | enable |
|
enable enhanced httpDNS.
Default is disbled. Need to pay attention to the following matters after open this function 1.This function is mutually exclusive with Httpdns. If turned on at the same time, the later turned on function will actually take effect; 2.this method need apply license enhanced dns function, otherwise this function will not work 3.need to add the cdn domain name through the interface, otherwise it will be downgraded to local dns
- See also
- [AliDomainProcessor addEnhancedHttpDnsDomain:NSString] 4.Please ensure that the domain name is added and configured with corresponding functions on the alicdn platform to ensure that online services can be provided. For configuration methods, please refer to: https://www.alibabacloud.com/product/content-delivery-network
- Parameters
-
◆ enableHttpDns:
+ (void) enableHttpDns: |
|
(BOOL) | enable |
|
enable httpDNS.
Default is disabled. Need to pay attention to the following matters after open this function 1.This function is mutually exclusive with enhanced Httpdns. 2.After opening, standard httpdns will be used for requests. If it fails, it will be downgraded to local dns.
- Parameters
-
◆ enableHWAduioTempo:
+ (void) enableHWAduioTempo: |
|
(bool) | enable |
|
enable/disable hardware audio tempo, player will use soft ware tempo filter when disabled, and it will affect the pcm data that from audio rending callback, it only can be reset in the same thread, enable by default.
◆ enableLocalCache:
+ (NSString *) enableLocalCache: |
|
(BOOL) | enable |
|
Enable local cache.
When enabled, it will be cached in local files.
- Parameters
-
enable | true: enables the local cache. false: disable. This function is disabled by default. |
- Returns
- local cache path
◆ enableLocalCache:maxBufferMemoryKB:localCacheDir:
+ (void) enableLocalCache: |
|
(bool) | enable |
maxBufferMemoryKB: |
|
(int) | maxBufferMemoryKB |
localCacheDir: |
|
(NSString *) | localCacheDir |
Enable local cache.
When enabled, it will be cached in local files.
- Parameters
-
enable | true: enables the local cache. false: disable. This function is disabled by default. |
maxBufferMemoryKB | this parameter is deprecated. Set the maximum memory size for a single source. Unit is KB |
localCacheDir | Directory of files cached locally, absolute path |
◆ enableNetworkBalance:
+ (void) enableNetworkBalance: |
|
(BOOL) | enable |
|
enable Network Balance mechanism for control media loader's scheduling automatically.
Default is enabled.
- Parameters
-
◆ forceAudioRendingFormat:fmt:channels:sample_rate:
+ (void) forceAudioRendingFormat: |
|
(bool) | force |
fmt: |
|
(NSString *) | fmt |
channels: |
|
(int) | channels |
sample_rate: |
|
(int) | sample_rate |
force audio render use the particular format,the value will no effect when the format not supported by device,the out range value will be ignored,and use the default value; and it will affect the pcm data that from audio rending callback, it only can be reset in the same thread, disabled by default.
- Parameters
-
force | enable/disable |
fmt | the pcm format, only support s16 for now, signed integer with 16 bits |
channels | the pcm channels, available range 1~8 |
sample_rate | set the pcm sample rate, available range 1~48000 |
◆ setAdaptiveDecoderGetBackupURLCallback:
Set the callback to get backup url.
◆ setCacheFileClearConfig:maxCapacityMB:freeStorageMB:
+ (void) setCacheFileClearConfig: |
|
(int64_t) | expireMin |
maxCapacityMB: |
|
(int64_t) | maxCapacityMB |
freeStorageMB: |
|
(int64_t) | freeStorageMB |
Settings related to automatic clearing of local cache files.
- Parameters
-
expireMin | How long the cache expires: the unit is minute. The default value is 30 days. |
maxCapacityMB | maximum cache capacity: in megabytes. The default value is 2GB. If the total cache size exceeds this size, some caches are discarded one by one in the cacheItem granularity until they are smaller than or equal to the maximum cache capacity. Recommend 500MB if based on short video bussiness. |
freeStorageMB | Minimum free disk capacity: in megabytes. The default value is 1GB. If the current disk capacity is less than this value, the freeStorage will be eliminated one by one until the freeStorage is greater than or equal to this value or all caches are eliminated. |
◆ setCacheUrlHashCallback:
Sets the hash callback to load the URL.
If this parameter is not set, the SDK uses md5 algorithm.
◆ setDNSResolve:ip:
+ (void) setDNSResolve: |
|
(NSString *) | host |
ip: |
|
(NSString *) | ip |
Set a DNS ip to resolve the host.
- Parameters
-
host | The host. Need to specify the port (http defualt port is 80,https default port is 443). E.g player.alicdn.com:443 |
ip | The ip address, set as empty string to clear the setting. |
◆ setFairPlayCertID:
+ (void) setFairPlayCertID: |
|
(NSString *) | certID |
|
Set the .fairPlay certID, update the certID must use the thread first set.
- Parameters
-
◆ setIpResolveType:
Set a IP type when resolve the host.
- Parameters
-
◆ setNetworkDataProcessCallback:
Set the network data callback.
◆ setOption:value:
+ (void) setOption: |
|
(GlobalOption) | key |
value: |
|
(NSString *) | value |
Set specific option.
- Parameters
-
key | key option |
value | value of key |
◆ setOption:valueInt:
+ (void) setOption: |
|
(GlobalOption) | key |
valueInt: |
|
(int) | value |
Set specific option.
- Parameters
-
key | key option |
valueInt | value of key |
◆ setUseHttp2:
+ (void) setUseHttp2: |
|
(bool) | use |
|
Set use http2 or not。Default is true since from v5.5.0.0.
- Parameters
-
The documentation for this class was generated from the following file: