MPMoviePlayerController Getting Thumbnail from Streaming Video?

橙三吉。 提交于 2019-12-13 05:49:15

问题


I'm trying to get a Video Thumbnail from Streaming Video when touched to a Button. I've used both;

- (UIImage *)thumbnailImageAtTime:(NSTimeInterval)playbackTime timeOption:(MPMovieTimeOption)option
- (void)requestThumbnailImagesAtTimes:(NSArray *)playbackTimes timeOption:(MPMovieTimeOption)option

But everytime, returned image is null, or getting error below;

Error Domain=AVFoundationErrorDomain Code=-11838 "Operation Stopped" UserInfo=0x7ac5560 {NSLocalizedFailureReason=The operation is not supported for this media., NSUnderlyingError=0x7a82ea0 "The operation couldn’t be completed. (OSStatus error -12435.)", NSLocalizedDescription=Operation Stopped}

is there any luck to get thumbnail from streaming video? Thanks.


回答1:


You will have to download the whole video before you can get a thumb with API requests...as it says the API does not support getting thumbs from remote media



来源:https://stackoverflow.com/questions/9723449/mpmovieplayercontroller-getting-thumbnail-from-streaming-video

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!