This document describes how to quickly run Tencent Cloud MLVB-API-Example for iOS.
Environment Requirements
Xcode 9.0 or later
iPhone or iPad with iOS 9.0 or later
A valid developer signature for your project
Prerequisites
Directions
Step 1. Download the SDK and MLVB-API-Example source code
1. Download the package here as needed. Here, the Live Edition is used as an example. 2. Decompress the file after download.
Note
The source code can also be obtained from GitHub. Step 2. Configure the license
2. Enter the App Name
, Package Name
, and Bundle ID
as needed, select the Live streaming feature module (Live Push + Video Playback), and click Confirm.
Package Name: Enter the applicationId in the build.gradle file in the App
directory.
Bundle ID: Enter the Bundle Identifier of the project in Xcode.
3. After the free trial license is created successfully, the page will display the information of the generated license. You need to pass in two parameters Key
and License URL
during initial SDK configuration. Store the following information properly:
4. Open the LiteAVSDK_Live_iOS_version number/MLVB-API-Example-OC/Debug/GenerateTestUserSig.h
file.
Set parameters in GenerateTestUserSig.h
as follows:
LICENSEURL: Empty by default. Set it to the actual download license URL.
LICENSEURLKEY: Empty by default. Set it to the actual download license key.
Step 3. Configure stream push/playback capabilities
1. Apply for a domain name in DNSPod and get an ICP filing for it. 3. Configure the CNAME record for the domain name as instructed in Configuring CNAME. 4. After configuring the stream push/playback domain name, you can get the CNAME
information on the Basic Info page of the domain name.
5. Open the LiteAVSDK_Live_iOS_version number/MLVB-API-Example-OC/Debug/GenerateTestUserSig.h
file.
Set parameters in GenerateTestUserSig.h
as follows:
LIVE_URL_KEY: This parameter is optional. It is used to generate authentication information such as txSecret
. For more information on how to calculate it, see Publishing/Playback URL. You can query it in Manage > Stream Push Configuration > Authentication Configuration on the Domain Name page. Configuring stream push parameters
1. Find and open the LiteAVSDK_Live_iOS_version number/MLVB-API-Example-OC/Debug/GenerateTestUserSig.h
file.
SDKAppID: 0
by default. Set it to the actual SDKAppID
.
SECRETKEY: Empty by default. Set it to the actual secret key.
Stream push URL field description
You need to concatenate the specific stream push/pull URL string based on the used protocol as instructed in Publishing/Playback URL. A string has been concatenated in the demo, and the stream can be played back after you run the demo. Step 5. Compile and run
Open the demo project MLVB-API-Example-OC
with Xcode 9.0 or later and click Run.
Was this page helpful?