-
Notifications
You must be signed in to change notification settings - Fork 479
Use KSYMediaPlayer
changsanjiang edited this page Sep 24, 2021
·
2 revisions
Reinstall in the following way
source 'https://cdn.cocoapods.org/'
pod 'SJBaseVideoPlayer/KSYMediaPlayer'
pod 'SJVideoPlayer'
pod 'KSYMediaPlayer_iOS/KSYMediaPlayer_vod', :git => 'https://github.com/ksvc/KSYMediaPlayer_iOS.git'
// 1. import header file
#import <SJBaseVideoPlayer/SJKSYMediaPlayerPlaybackController.h>
_player = SJVideoPlayer.player;
// 2. Switch playback control to SJKSYMediaPlayerPlaybackController
_player.playbackController = SJKSYMediaPlayerPlaybackController.new;
// 3. play video
SJVideoPlayerURLAsset *asset = [SJVideoPlayerURLAsset.alloc initWithURL:SourceURL0];
_player.URLAsset = asset;