Tencent Cloud Basic Function Class.
◆ TXLiveBaseDelegate-p
| protocol TXLiveBaseDelegate-p |
◆ onLicenceLoaded:Reason:()
| - (void) onLicenceLoaded: |
|
(int) |
result |
| Reason: |
|
(NSString *) |
reason |
|
|
| |
|
optional |
Callback of setLicenceURL interface, result = 0 for success, negative number for failure. @discussion The delegate needs to be set before calling setLicenceURL.
◆ onLog:LogLevel:WhichModule:()
| - (void) onLog: |
|
(NSString *) |
log |
| LogLevel: |
|
(int) |
level |
| WhichModule: |
|
(NSString *) |
module |
|
|
| |
|
optional |
Log callback @discussion 1.Implement TXLiveBaseDelegate, it is recommended to use it in an earlier initialization class such as AppDelegate 2.Set this callback during initialization, eg:[TXLiveBase sharedInstance].delegate = self; 3.For the level type, see TX_Enum_Type_LogLevel 4.The module value has no specific meaning for now, it is currently a fixed value of TXLiteAVSDK.
◆ onUpdateNetworkTime:message:()
| - (void) onUpdateNetworkTime: |
|
(int) |
errCode |
| message: |
|
(NSString *) |
errMsg |
|
|
| |
|
optional |
NTP time synchronization, trigger after called TXLiveBase::updateNetworkTime.
- Parameters
-
| errCode | 0: indicates that the time adjustment is successful and the deviation is within 30ms, 1: indicates that the time adjustment is successful but the deviation may be more than 30ms, -1: indicates that the time adjustment fails |
◆ TXLiveBase
◆ getLicenceInfo()
| + (NSString *) getLicenceInfo |
|
|
|
Get license information.
- Returns
- Licence Information
◆ getNetworkTimestamp()
| + (NSInteger) getNetworkTimestamp |
|
|
|
Get NTP timestamp (milliseconds), please use after receiving onUpdateNetworkTime callback
- Returns
- NTP timestamp (milliseconds), if it returns 0: NTP time synchronization is not started or failed, please restart the time synchronization
◆ getPituSDKVersion()
| + (NSString *) getPituSDKVersion |
|
|
|
Get pitu version information.
- Returns
- pitu version information
◆ getSDKVersionStr()
| + (NSString *) getSDKVersionStr |
|
|
|
Get SDK version information.
- Returns
- SDK version information
◆ setAppID:()
| + (void) setAppID: |
|
(NSString *) |
appID |
|
Set appID, used by server control.
◆ setAppVersion:()
| + (void) setAppVersion: |
|
(NSString *) |
verNum |
|
◆ setAudioSessionDelegate:()
| + (void) setAudioSessionDelegate: |
|
(nullable id< TXLiveAudioSessionDelegate >) |
delegate |
|
◆ setConsoleEnabled:()
| + (void) setConsoleEnabled: |
|
(BOOL) |
enabled |
|
Enable or disable console log printing
- Parameters
-
| enabled | Specifies whether to enable |
◆ setExternalDecoderFactory:()
| + (void) setExternalDecoderFactory: |
|
(id) |
decoderFactory |
|
Set the HEVC external decoder factory instance.
◆ setGlobalEnv:()
| + (int) setGlobalEnv: |
|
(const char *) |
env_config |
|
Set the environment for liteav SDK to access. The deployment environment of Tencent Cloud in various regions of the world requires access to access points in different regions according to the requirements of policies and regulations in each region.
- Parameters
-
| env_config | The environment that needs to be connected, the default access environment of the SDK is: the default official environment. |
- Returns
- 0: success; other: error
- Attention
- Do not call this interface if target market is mainland China. If the target market is overseas users, please contact us through technical support to understand the configuration method of env_config to ensure that the App complies with the GDPR standard.
◆ setLicenceURL:key:()
| + (void) setLicenceURL: |
|
(NSString *) |
url |
| key: |
|
(NSString *) |
key |
|
|
| |
Set the license download url and key of the sdk.
◆ setLogLevel:()
Set log output level
- Parameters
-
◆ setUserId:()
| + (void) setUserId: |
|
(NSString *) |
userId |
|
Set userId for data reporting.
◆ sharedInstance()
| + (instancetype) sharedInstance |
|
|
|
◆ updateNetworkTime()
| + (NSInteger) updateNetworkTime |
|
|
|
Start NTP time service
- Returns
- 0: start successfully; < 0: start failed
◆ delegate
All logs are called back to the SDK user through this delegate, and the SDK user decides how to handle the log.
◆ TX_Enum_Type_LogLevel
| Enumerator |
|---|
| LOGLEVEL_VERBOSE | Output logs of all levels.
|
| LOGLEVEL_DEBUG | Output logs of DEBUG, INFO, WARNING, ERROR and FATAL level.
|
| LOGLEVEL_INFO | Output logs of INFO, WARNING, ERROR and FATAL levels.
|
| LOGLEVEL_WARN | Only output logs of WARNING, ERROR and FATAL levels.
|
| LOGLEVEL_ERROR | Only output logs of ERROR and FATAL level.
|
| LOGLEVEL_FATAL | Only output logs of FATAL level.
|
| LOGLEVEL_NULL | Do not output any sdk logs.
|