PoporAVPlayer 1.02

PoporAVPlayer 1.02

popor 维护。



 
依赖项
PoporOrientation>= 0
PoporUI/UIView>= 0
PoporUI/IToast>= 0
PoporFoundation/Prefix>= 0
PoporFoundation/NSAssistant>= 0
Masonry>= 0
KVOController>= 0
ReactiveObjC>= 0
 

  • 作者:
  • popor

MyBox

PoporAVPlayer

CI Status Version License Platform

示例

要运行示例项目,先克隆仓库,然后在 Example 目录下首先运行 pod install

一个简单的支持方向的视频播放器。

1.需要在 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];
}

需求

安装

PoporAVPlayer可以通过CocoaPods获取。要安装它,只需将以下行添加到您的Podfile中

pod 'PoporAVPlayer'

作者

popor, [email protected]

许可

PoporAVPlayer遵循MIT许可协议。更多信息请参阅LICENSE文件。