zhengwenming / wmplayer Goto Github PK
View Code? Open in Web Editor NEWWMPlayer-AVPlayer的封装,继承UIView,支持pods,手势快进、快退,全面适配全面屏,同时支持网络和本地视频的播放
License: MIT License
WMPlayer-AVPlayer的封装,继承UIView,支持pods,手势快进、快退,全面适配全面屏,同时支持网络和本地视频的播放
License: MIT License
我是直接复制的你demo里的DetailViewController文件里的创建方法,但是真机上就是没有画面
提示
2016-04-26 16:26:20.046 tableviewTest[3211:1199857] _BSMachError: (os/kern) invalid capability (20)
2016-04-26 16:26:20.049 tableviewTest[3211:1199857] _BSMachError: (os/kern) invalid name (15)
按全屏按钮旋转没问题,但是重力旋转 全屏都是错的,无法全屏,代码都一样,不清楚哪里错了
dealloc释放self.currentItem 遇到崩溃现象 ,原因是重写currentItem set方法时判断使用_currentItem,_currentItem未清空.
ios10 左上角出现一个小电视 而且播放不完整 ,且有声音,没有图像?求解 ???
我用了一下发现播放网络视频每次都是重新获取,你这个能不能做成边播放视频边缓存?
4K以下的都能完美播放,但是4K的怎么播放,求大神赐教
hi 看了你的WMPlayer感觉写的很用心 能否添加视频清晰度功能
WMPlayerFinishedPlayNotification 这个通知无法触发
我测试用的这个视频地址是: [self.wmPlayer setURLString:@"http://192.168.0.128:81/easyframe/ubirth/riskfile/182/1ae5f8f4-6a3a-458f-9d86-09c070bb3455.mp4"];
我是在这个类里测试的TestViewController
视频加载失败===Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSUnderlyingError=0x7f82ca855a40 {Error Domain=NSOSStatusErrorDomain Code=-101 "(null)"}, NSLocalizedFailureReason=An unknown error occurred (-101), NSLocalizedDescription=The operation could not be completed}
希望能帮下我,急
谢谢您这么优秀的播放器
请问未来手势操作会支持播放进度与亮度调整吗?
谢谢
首先,非常感谢作者的无私奉献,拿出来这么好的东西开源.该项目也是我非常欣赏的项目之一.我在使用过程中发现有出现滑动slide时,有一些卡顿现象.用了一些时间仔细分析了造成的原因是在滑动时,计时器仍然运行造成,滑动的slide与计时器的slide不匹配,造成卡顿.幸运的是,我找到了解决方案.所以拿来给大家分享一下.附件为我改过的文件上传,不为别的,也希望能像作者一样帮助更多的人.
VMPlayDemo.zip
可以cocoapods导入吗?大神
toCell方法中, VideoCell *currentCell = [self currentCell]; 改为
VideoCell *currentCell = (VideoCell *)[self.table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:currentIndexPath.row inSection:0]];
当视频播放中进入后台时 视频会继续播放 存在bug
逻辑问题 将if 和 else 中的内容交换一下可解决
typedef NS_ENUM(NSInteger, WMPlayerState) {
WMPlayerStateFailed, // 播放失败
WMPlayerStateBuffering, // 缓冲中
WMPlayerStatusReadyToPlay, //将要播放
WMPlayerStatePlaying, // 播放中
WMPlayerStateStopped, //暂停播放
WMPlayerStateFinished //播放完毕
};
在使用过程中,并不是很严格。
例如,在wmPlayer.state readyToPlay时,而实际上已经播放。
而且,在使用pause时,暂停时状态变化诡异
我昨天集成了WMPlayer,全部参照demo来的,集成OK了,能显示能播放,但是有个严重的问题,就是不响应点击事件,所有点击都被表格的didSelectRowAtIndexPath截获,WMPlayer的UITapGestureRecognizer事件不响应。怎么解决啊?
但是跑你的demo是可以的。
Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<MASLayoutConstraint:0x7fad86842790 UIProgressView:0x7fad82dee750.left == UISlider:0x7fad8698f0d0.left>",
"<MASLayoutConstraint:0x7fad868433a0 UIProgressView:0x7fad82dee750.right == UISlider:0x7fad8698f0d0.right>",
"<MASLayoutConstraint:0x7fad86843400 UIProgressView:0x7fad82dee750.centerX == UISlider:0x7fad8698f0d0.centerX + 0.7>"
)
Will attempt to recover by breaking constraint
<MASLayoutConstraint:0x7fad86843400 UIProgressView:0x7fad82dee750.centerX == UISlider:0x7fad8698f0d0.centerX + 0.7>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
就是播放视频前会跳到一段汇编中
libc++abi.dylib
__cxa_throw:
-> 0x113cb0c6b <+0>: pushq %rbp
0x113cb0c6c <+1>: movq %rsp, %rbp
0x113cb0c6f <+4>: pushq %r15
0x113cb0c71 <+6>: pushq %r14
0x113cb0c73 <+8>: pushq %r12
`
main语句也会打上断点,而且wmplayer的代理没有回调
但程序能继续运行
如题所述
可以自定义 解码方式吗 ? 支持 自定义解码方式么 ?
(。・∀・)ノ゙嗨,文明大神,我用了你的 wmPlayer ,非常好用,但是它抛出 “视频加载失败” 的时间太长了,我们希望 wmPlayer 能在15s 中重连 3 次左右,超过 15s 还没连不上就判断为加载失败,我想可以直接退了就好,但是老大表示,我不能这么残暴的对待代码,所以,我们想来征求一下你的意见 ~
你好,我最近也在做视频播放的项目,但是我发现进入播放详情页的时候,如果用手势滑动返回的话,视频就会卡顿,不知道你有好的解决方案不。
当点击全屏来到 toFullScreenWithInterfaceOrientation 方法时, 不用从新修改那么多控件的约束, 只需要在WMPlayer 内部初始化时, 添加一个(UIView *)containerView, 把所有的子控件放到它的上面, 以后全平时, 只修改containerView 的约束;
如题,麻烦您告知下,谢谢!
请问下 mpg 格式视频不支持播放吗?
能做出来却是技术了得,功能也十分强大。不过对于一个框架来说它的复用性并不是很好,继承这个类的话,可以实现,但是太多问题,所以希望还是再多多把代码封装进去
再6s上全屏播放时,单击屏幕会出现卡顿1秒的现象,不能正常双击暂停或继续播放
视频进度滑动时 滑块抖动
wmPlayer = [[WMPlayer alloc]initWithFrame:videoRect];
wmPlayer.delegate = self;
wmPlayer.closeBtnStyle = CloseBtnStyleClose;
wmPlayer.URLString = [[NSBundle mainBundle] pathForResource:@"失恋33天" ofType:@"mp4"];
[self.view addSubview:wmPlayer];
[wmPlayer play];
当播放本地视频时,指示器一直显示,而且不能播放
1.干掉Masonry
2.初始化不需要url(支持xib)
can you make it work with youtube plz
使用您的WMPlayer视频播放器源码,在6plus上cell中播放视频是没问题的,但在小屏幕中(如iPhone5)上播放时,点击播放cell上的playBtn并不隐藏,强制隐藏会造成cell复用时其他cell没有playBtn按钮显示。
你好,我想简单快速创建播放器。但是打开后是黑屏的。。代码如下(filePath是文件路径,可以打开,文件没问题):求指教
self.wmPlayer = [[WMPlayer alloc]initWithFrame:[UIScreen mainScreen].bounds]; self.wmPlayer.URLString = filePath.absoluteString; [self.wmPlayer.bottomView removeFromSuperview]; [self.wmPlayer.closeBtn removeFromSuperview]; [self.wmPlayer play]; [self.contentView insertSubview:self.wmPlayer belowSubview:self.feedActionView];
想问下,修改self.wmPlayer.frame的同时修改self.wmPlayer.playerLayer.frame,
会优先修改self.wmPlayer.playerLayer.frame,导致视频看起来出框了,想问下self.wmPlayer.playerLayer.frame的修改是不是自带了动画?可是找了下并没有见到有动画。
if (newOffset.y > 20) {
CGRect frame = self.frame;
if(frame.size.width>120){
frame.size.height = frame.size.height - newOffset.y;
}
if(frame.size.height<120){
frame.size.height = 120;
}
self.wmPlayer.frame = frame;
self.wmPlayer.playerLayer.frame = frame;
self.wmPlayer.bottomView.frame = CGRectMake(0, self.wmPlayer.frame.size.height-40, SCREEN_WIDTH, 40);
self.scrollView.frame = CGRectMake(0, 120, SCREEN_WIDTH, SCREEN_HEIGHT-120);
}else{
CGRect frame = self.frame;
if (frame.size.height<195) {
frame.size.height = frame.size.height + newOffset.y;
}
if (frame.size.height>195) {
frame.size.height = 195;
}
self.wmPlayer.frame = frame;
self.wmPlayer.playerLayer.frame = frame;
self.wmPlayer.bottomView.frame = CGRectMake(0, self.wmPlayer.frame.size.height-40, SCREEN_WIDTH, 40);
self.scrollView.frame = CGRectMake(0, 195, SCREEN_WIDTH, SCREEN_HEIGHT-195);
}
我是这样写的。希望能指导下。
看了代码,作者好像只在UIControlEventTouchUpInside的时候做了事件处理,作者可以考虑优化下这个问题
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.