xjlove / xjavplayer Goto Github PK
View Code? Open in Web Editor NEW一句代码调用的视频播放器
一句代码调用的视频播放器
为什么我的横屏只是播放器被拉大了,并没有真正的横屏
pop后无法释放
self.bottomMenu.xjFullOrSmallBlock = ^(BOOL isFull){
_isallFull = isFull;
NSLog(@"全屏---%u",isFull);
if (isFull) {
[UIDevice setOrientation:UIInterfaceOrientationLandscapeRight];
weakSelf.frame = weakSelf.window.bounds;
}else{
[UIDevice setOrientation:UIInterfaceOrientationPortrait];
weakSelf.frame = weakSelf.firstFrame;
}
};
- (void)xjTopMenuBlock{
WS(weakSelf);
//返回
self.topMenu.xjTopGoBack = ^{
_isallFull = NO;
if (weakSelf.bottomMenu.xjFull) {
[UIDevice setOrientation:UIInterfaceOrientationPortrait];
weakSelf.frame = weakSelf.firstFrame;
weakSelf.bottomMenu.xjFull = NO;
}else{
if ([weakSelf.XjAVPlayerSDKDelegate respondsToSelector:@selector(xjGoBack)]) {
[weakSelf.XjAVPlayerSDKDelegate xjGoBack];
}
}
};
}
_isallFull要用弱引用,这样直接使用会对self造成强引用导致循环引用
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x7f8732e86e60 of class AVPlayerItem was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x7f8735377200> (
<NSKeyValueObservance 0x7f87352a4160: Observer: 0x7f873536ad80, Key path: status, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x7f87352a3c20>
<NSKeyValueObservance 0x7f87352a4280: Observer: 0x7f873536ad80, Key path: loadedTimeRanges, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x7f87352a41c0>
)'
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.