0

该应用程序在硬件甚至模拟器上启动时显示黑屏,我没有自定义启动,我有默认的黑色启动屏幕,我尝试将应用程序放在越狱 iPod Touch 4G,6.1.3

查看控制器.h

#import <UIKit/UIKit.h>
#import <MediaPlayer/MediaPlayer.h>

@interface ViewController : UIViewController

@property (strong, nonatomic) MPMoviePlayerController * mcp;

@end

查看控制器.m

@implementation ViewController
@synthesize mcp;

- (void)viewDidLoad
{
NSURL *movieURL = [NSURL     URLWithString:@"http://streamer35.eboundservices.com:1935/tv/humtv/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9Ny8zMC8yMDEzIDg6MTI6MzEgUE0maGFzaF92YWx1ZT1odmptUTNGVGxSazd6Mlp6dk91eW5RPT0mdmFsaWRtaW51dGVzPTIw"];

MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL: movieURL];
[player prepareToPlay];
[player.view setFrame: self.view.bounds];  // player's frame must match parent's

mcp = player;

[self.view addSubview: mcp.view];
[mcp play];
}
4

0 回答 0