2
我想從我的代碼中刪除movie.Stop()
行。如何從電影中獲取縮略圖,而無需播放啓動Monotouch
還有什麼其他方法可以用來從電影中獲得縮略圖?
NSUrl data = new NSUrl(info.ObjectForKey(new NSString("UIImagePickerControllerMediaURL")).ToString());
//get the video thumbnail
MPMoviePlayerController movie = new MPMoviePlayerController(data);
movie.Stop();
UIImage videoThumbnail = movie.ThumbnailImageAt(0.0, MPMovieTimeOption.NearestKeyFrame);
movie.Stop();
感謝您的編輯 –