Due to the limitation of recording screen, the actual experience on real device is much better the gif shown above.
The project is based on the open source project of the IJKPlayer, Adds some basic functions based on this
1.Left of the screen brightness adjustment slide vertically
2.The right screen slides up and down to adjust the volume
3.Drag left and right to change the playback progress
4.Horizontal and vertical screen switching
1.Support rtmp/hls live streaming
2.Video cloud url broadcast
Due to IJKPlayer framework is relatively large, it is not uploaded into the project. Please click on the link below to extract it, unzip it and put it into the project.
Click here to download the IJKPlayer that has already been framed
#import "LMIJKVideoPlayerView.h"
/** 视频播放视图 */
@property (nonatomic, strong) LMIJKVideoPlayerView *playerView;
-(LMIJKVideoPlayerView *)playerView{
if (!_playerView) {
_playerView = [[LMIJKVideoPlayerView alloc]initWithFrame:self.view.frame];
}
return _playerView;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self.view addSubview:self.playerView];
//测试地址
//rtmp 直播 香港电视台测试地址 rtmp://live.hkstv.hk.lxdns.com/live/hks
//录播 播放流
//http://qimage.owhat.cn/test/master/media/1510731201386.mp4
self.playerView.videoUrl = @"http://qimage.owhat.cn/test/master/media/1510731201386.mp4";
}
When the controller is destroyed, remember to call the destroy method of the video player:
- (void)dealloc{
[self.playerView deallocPlayer];
}