我打造的電影播放這樣的...的MPMoviePlayerController thumbnailImageAtTime:timeOption:簡單的情況下不能正常工作
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:url];
player.view.frame = myView.bounds;
player.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[player prepareToPlay];
[myView addSubview:player.view];
self.mp = player;
該URL指向的網頁M3U8流。它玩的很好。然後我要求一個這樣的圖像...
NSTimeInterval currentInterval = self.mp.currentPlaybackTime;
UIImage *image = [self.mp thumbnailImageAtTime:currentInterval timeOption:MPMovieTimeOptionExact];
我試過將currentInterval支持一秒鐘。我已經嘗試了兩個時間選項(確切和關鍵幀),但圖像始終爲零。任何想法爲什麼?謝謝。
壞消息,但一個很好的答案。謝謝。 – danh 2012-07-18 21:39:42
@Martin我不得不採取縮略圖web服務的方式。我們的分段器必須每隔10秒產生一個縮略圖,它看起來不錯,但它不是我尋找的精度。問候 – javiergov 2012-09-12 14:24:38
好的回答.... – 2013-01-30 12:06:49