Skip to content

Use PLPlayerKit

changsanjiang edited this page Feb 21, 2020 · 1 revision

In this page

Reinstall

Reinstall in the following way

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

  pod 'SJBaseVideoPlayer/PLPlayer'
  pod 'SJVideoPlayer'

How to use

// 1. import header file
    #import <SJBaseVideoPlayer/SJPLPlayerPlaybackController.h>

    _player = SJVideoPlayer.player;
// 2. Switch playback control to SJPLPlayerPlaybackController
    _player.playbackController = SJPLPlayerPlaybackController.new;
// 3. play video
    SJVideoPlayerURLAsset *asset = [SJVideoPlayerURLAsset.alloc initWithURL:SourceURL0];
    asset.pl_playerOptions = PLPlayerOption.defaultOption;
    _player.URLAsset = asset;
Clone this wiki locally