Hysen Labs
Open-source project
zhengwenming/WMPlayer avatar
zhengwenming

WMPlayer

GitHub describes it as WMPlayer-AVPlayer的封装,继承UIView,支持pods,手势快进、快退,全面适配全面屏,同时支持网络和本地视频的播放. The repository metadata lists Objective-C as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.

3,275 stars759 forksObjective-CMIT
01
DEEP OPEN-SOURCE ANALYSIS

zhengwenming/WMPlayer: 功能

GitHub describes it as WMPlayer-AVPlayer的封装,继承UIView,支持pods,手势快进、快退,全面适配全面屏,同时支持网络和本地视频的播放. The repository metadata lists Objective-C as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.

02
DEEP OPEN-SOURCE ANALYSIS

Repository scope

GitHub describes it as WMPlayer-AVPlayer的封装,继承UIView,支持pods,手势快进、快退,全面适配全面屏,同时支持网络和本地视频的播放. The repository metadata lists Objective-C as its primary language. The metadata lists the MIT license. The README describes the project this way: - [x] 支持cocoapods - [x] 支持旋转屏:全屏模式和小屏模式切换,自动感应旋转 - [x] 支持网络和本地视频资源播放 - [x] 支持播放系统相册中的视频 - [x] 支持cell中播放,列表播放 - [x] 支持手势改变屏幕的亮度(屏幕左半边) - [x] 支持手势改变音量大小(屏幕右半边) - [x] 支持手势滑动快进快退、拖动Slider快进快退、点击Slider跳到点击位置播放 - [x] 支持直接跳到某个时间点播放 - [x] 支持全屏锁定🔒 - [x] 支持后台播放视频 - [x] 全面适配iPhone X - [x] 支持播放器静音 - [x] 支持循环播放 - [x] 支持画中画功能PictureInPicture - [x] 支持倍速播放(0.5X、1.0X、1.25X、1.5X、2X) - [x] 支持列表跳转详情页播放同一个视频资源,达到无缝播放效果,类似今日头条的列表到详情页。 - [x] 支持动态改变播放器的填充模式

03
DEEP OPEN-SOURCE ANALYSIS

pod使用的问题总结

The README section "pod使用的问题总结" states: 1、pod search WMPlayer 如果pod搜到WMPlayer版本为3.0.6,或者搜索不到,那么请更新Mac的ruby版本为2.4.x,同时更新pod版本为V1.5.3,更新的文章请参考:https://www.cnblogs.com/angelgril/p/6731015.html

04
DEEP OPEN-SOURCE ANALYSIS

Usage

The README section "Usage" states: 1、旋转view 思路:顾名思义,就是讲WMPlayer旋转90°,然后设置宽高为屏幕的宽和高,先从父视图上(可能是self.view)移除,然后在屏幕旋转的通知里面add到window上,造成全屏的效果,或者说造成全屏的假象吧。 案例:网易新闻 代码:比较low,不在维护。但是这个功能是支持的,开发者自行开发,或者看老版本的代码(5.0以前的版本)。 bug:通知栏的方向不是横屏模式;键盘和UIAlertView的弹出方向还是竖屏模式。

05
DEEP OPEN-SOURCE ANALYSIS

Usage

The README section "Usage" states: 3、自定义转场动画 思路:present出一个全屏的VC,同时WMPlayer做动画到全屏VC上。具体可以参考demo代码 案例:爱奇艺客户端 代码:详见demo中的新浪tab对应的DetailViewController.m里面,一定要添加全屏按钮的点击事件,并添加了代码才能有全屏的效果,不然就是一个普通的Button,点击没反应的。

06
DEEP OPEN-SOURCE ANALYSIS

Editorial conclusion

The repository README is the source for this review. It does not replace a local installation or an independent test.

07
DEEP OPEN-SOURCE ANALYSIS

Official sources

08
Community notes

Community notes