Site B live broadcast DEMO ijkplayerDemo, demoijkplayerdemo

Source: Internet
Author: User

Site B live broadcast DEMO ijkplayerDemo, demoijkplayerdemo

1. Download ijkplayer

After ijkplayer is downloaded, decompress the package and the internal directory of the folder is as follows:

Ii. Compile ijkplayer

Ijkplayer compilation is actually ffmpeg compilation. Here we have downloaded ijkplayer, so README on github. some steps in building iOS in md are not required. next we will start step-by-step compilation: 1. open the terminal, cd to the jkplayer-master folder, that is, the downloaded and decompressed folder, such as: 2. execute the command line. /init-ios.sh, this step is to download ffmpeg, time will be a little longer, wait patiently. example: 3. after the download is completed in step 1, run cd ios, that is, enter the ios directory, for example: 4. go to the ios folder and run the commands on the terminal in sequence. /compile-ffmpeg.sh clean and. /compile-ffmpeg.sh all command, compile ffmpeg, that is, README. in md, for example, the compilation takes a long time. wait patiently.

3. Package the IJKMediaFramework. framework

There are two ways to integrate ijkplayer: one is to directly import the IJKMediaPlayer project as in the IJKMediaDemo project. xcodeproj, which is not described here, for example, the second integration method is to package ijkplayer into the framework for importing the project. the following describes how to package IJKMediaFramework. framework, follow these steps to start step by step: First open the project IJKMediaPlayer. xcodeproj, such as: after opening, such as: 2. after the project is opened, set the project's scheme. The specific steps are as follows: 3. after scheme is set, select the real machine and simulator for compilation. After compilation, go to the Finder. For example, after entering the Finder, you can see the compilation results of the real machine and simulator versions, for example, merge the framework of the real machine and simulator versions as follows. Be sure not to merge the errors. The file is merged. For example, open the terminal and merge the files. The specific format of the command line is as follows:

Lipo-create "true machine version path" "Simulator version path"-output "merged file path"

After merging, for example, below is very important. You need to use the merged IJKMediaFramework to replace the original IJKMediaFramework. For example, if you want to understand: After completing steps 1 and 2, the IJKMediaFramework in the green box. the framework file is the framework we need. You can copy it out and import it to the project later.

Iv. Integrate ijkplayer In the iOS Project

Create a project and import the merged IJKMediaFramework. framework and related dependency frameworks, for example, after the framework is imported. m for testing. First import IJKMediaFramework. h header file. check whether there are any errors during compilation. If there are no errors, the integration is successful. then start in ViewController. in the m file, use the IJKMediaFramework framework for testing and write a simple live video for testing. Here, let's take a look at the running results. A Demo will be provided later for download.

Now, ijkplayer integration is complete!

 

Download Code:
Http://www.code4app.com/forum.php? Mod = viewthread & tid = 8941 & extra = page % 3D1% 26 filter % 3 Dsortid % 26 sortid % 3D1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.