用法,继承UIVIew,初始化传frame和URLString,调用play方法播放
1.初始化wmPlayer = [[WMPlayer alloc]initWithFrame:playerFrame videoURLStr:self.URLString];
[self.view addSubview:wmPlayer];
[wmPlayer.player play];
2.切换视频
[wmPlayer setVideoURLStr:model.mp4_url];
依赖库为Masonry。 使用过程中有bug,请联系我,我会及时修复。谢谢大家的支持
源码:https://github.com/zhengwenming/WMPlayer,喜欢的给个star