Skip to content

Use AliPlayer

changsanjiang edited this page Nov 7, 2019 · 4 revisions

In this page

Reinstall

Reinstall in the following way

pod 'SJBaseVideoPlayer/AliPlayer'
pod 'SJVideoPlayer'

How to use

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

_player = SJVideoPlayer.player;
// 2. Switch playback control to SJAliMediaPlaybackController
_player.playbackController = SJAliMediaPlaybackController.new;
// 3. play video
AVPUrlSource *source = [AVPUrlSource.alloc urlWithString:@"https://....mp4"];
_player.URLAsset = [SJVideoPlayerURLAsset.alloc initWithSource:source];