To run the example project, clone the repo, and run pod install
from the Example directory first.
MGPlayerView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'MGPlayerView'
PlayerView *playerView =[[PlayerView alloc]initWithFrame:CGRectMake(0, 80, self.view.bounds.size.width, self.view.bounds.size.width *9/16)];
[self.view addSubview:playerView];
[playerView playWithUrl:@"http://stream1.shopch.jp/HLS/out1/prog_index.m3u8"];
[playerView supportFullScreenWithVC:self];
playerView.delegateUI =self;
-(UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
return UIInterfaceOrientationMaskAllButUpsideDown;
}
-(UIInterfaceOrientationMask)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskPortrait;
}
[email protected], [email protected]
MGPlayerView is available under the MIT license. See the LICENSE file for more info.