Skip to content

Use AliVodPlayer

changsanjiang edited this page Nov 14, 2019 · 1 revision

In this page

Reinstall

Reinstall in the following way

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

  pod 'SJBaseVideoPlayer/AliVodPlayer'
  pod 'SJVideoPlayer'

How to use

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

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