Skip to content

Use AliPlayer

changsanjiang edited this page Feb 25, 2020 · 4 revisions

In this page

Reinstall

Reinstall in the following way

  source 'https://cdn.cocoapods.org/'

  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];
Clone this wiki locally