0
和我的代碼:
NSString *urlStr = @"http://easyhtml5video.com/images/happyfit2.mp4";
NSURL *url = [NSURL fileURLWithPath:urlStr];
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
[self.view addSubview:moviePlayer.view];
moviePlayer.view.frame = CGRectMake(0, 0, 320, 400);
[moviePlayer play];
當我開始應用的電影屏幕看到,但電影犯規發揮。你能幫我解決錯誤嗎?
它沒有發揮。屏幕被看到了一秒,但視頻沒有play.which框架你導入?以及你的.h類 – yatanadam
試試這個 - http://mobile.tutsplus.com/tutorials/iphone/mediaplayer-framework_mpmovieplayercontroller_ios4/。這也有源代碼。 –
錯誤是這樣的:類AVPlayerItem的實例0x7a58230被釋放,而鍵值觀察者仍然註冊它。觀察信息被泄露,甚至可能被錯誤地附加到其他物體上。在NSKVODeallocateBreak上設置一個斷點,在調試器中停止。以下是當前的觀察信息:( 上下文:0x0,屬性:0x78593e0> –
yatanadam