Skip to content

Use ijkplayer

changsanjiang edited this page Jul 14, 2022 · 9 revisions

In this page

Reinstall

Reinstall in the following way

source 'https://cdn.cocoapods.org/'
pod 'SJBaseVideoPlayer/IJKPlayer'
pod 'SJVideoPlayer'

注意: 如果podfile中包含了use_frameworks!, 请参考这里

Project configuration

Step 1:

Remove the extra items, retain only arm64 & arm64e. image

Step 2:

Set bitcode to NO. image

How to use

// 1. import header file
#import "SJIJKMediaPlaybackController.h"

_player = SJVideoPlayer.player;
// 2. Switch playback control to SJIJKMediaPlaybackController
_player.playbackController = SJIJKMediaPlaybackController.new;
// 3. play video
_player.URLAsset = [SJVideoPlayerURLAsset.alloc initWithURL:URL];
Clone this wiki locally