PoporAVPlayer
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
A simple video player, support orientation.
1.you need registe in AppDelegate
1.你需要在 AppDelegate中注册
- (BOOL)application:(UIApplication *)application did finishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[PoporOrientation swizzlingAppDelegate:self];
return YES;
}
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(nullable UIWindow *)window {
// this will be replaced by PoporOrientation within runtime, do not remove!
return UIInterfaceOrientationMaskPortrait;
}
2.demo
- (void)playVideoAction {
NSString *videoPath = [[NSBundle mainBundle] pathForResource:@"douyin" ofType:@"mp4"];
NSURL * videoURL = [NSURL fileURLWithPath:videoPath];
[self.navigationController pushViewController:[PoporAVPlayerVCRouter vcWithDic:@{@"title":@"升降桌", @"videoURL":videoURL, @"showLockRotateBT":@(YES)}] animated:YES];
}
Requirements
Installation
PoporAVPlayer is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'PoporAVPlayer'
Author
popor, [email protected]
License
PoporAVPlayer is available under the MIT license. See the LICENSE file for more info.