PoporAVPlayer 1.02

PoporAVPlayer 1.02

Maintained by popor.



 
Depends on:
PoporOrientation>= 0
PoporUI/UIView>= 0
PoporUI/IToast>= 0
PoporFoundation/Prefix>= 0
PoporFoundation/NSAssistant>= 0
Masonry>= 0
KVOController>= 0
ReactiveObjC>= 0
 

  • By
  • popor

MyBox

PoporAVPlayer

CI Status Version License Platform

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.