欢迎光临
我们一直在努力

自定义视频播放器界面

建站超值云服务器,限时71元/月

自定义视频播放器界面

项目介绍:

SRVideoPlayer

Features

  • Custom play interface. providing play, pause, full-screen and other functions. providing play progress bar, load progress bar etc.

  • Slide left of the screen up or down to adjust the brightness. Slide right of the screen up or down to adjust the sound.

  • Slide the screen left or right to adjust the play progress.


  • 自定义播放界面, 提供播放 暂停 全屏 快进 快退等功能.

  • 上下滑动屏幕左边调整亮度, 上下滑动屏幕右边调整音量.

  • 左右滑动屏幕控制播放进度.

Show pictures

image


image

Usage

/**
 Create a SRVideoPlayer object with videoURL, playerView and playerSuperView.

 @param videoURL        The URL of the video.
 @param playerView      The view which you want to display the video.
 @param playerSuperView PlayerView's super view.
 @return                A SRVideoPlayer object
 */
+ (instancetype)playerWithVideoURL:(NSURL *)videoURL playerView:(UIView *)playerView playerSuperView:(UIView *)playerSuperView;

UIView *playerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.width)];
playerView.center = self.view.center;
[self.view addSubview:playerView];
_videoPlayer = [SRVideoPlayer playerWithVideoURL:_videoURL playerView:playerView playerSuperView:playerView.superview];
_videoPlayer.videoName = @"Here Is The Video Name";
_videoPlayer.playerEndAction = SRVideoPlayerEndActionStop;
[_videoPlayer play];

Custom Settings

/** Action when video play to end, default is SRVideoPlayerEndActionStop. */
@property (nonatomic, assign) SRVideoPlayerEndAction playerEndAction;

/** The name of the video which will play. */
@property (nonatomic, copy) NSString *videoName;

TODO

Cache video data while downloading, next time play directly with local data, do not have to download again.
边下边缓存功能, 下一次播放的时候, 直接使用缓存数据不用再次下载.

If you have any question, please issue or contact me.
If this repo helps you, please give it a star, thanks a lot.
Have Fun.

SRVideoPlayer
1.自定义播放界面, 提供播放 暂停 全屏 快进 快退等功能.
2.上下滑动屏幕左边调整亮度, 上下滑动屏幕右边调整音量.
3.左右滑动屏幕控制播放进度.
GitHub: https://github.com/guowilling/SRVideoPlayer
Have Fun.

code4app

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 自定义视频播放器界面
分享到: 更多 (0)