简体   繁体   English

如何从i3上的m3u8直播中获取缩略图?

[英]How to get thumbnail photo from m3u8 live stream on ios?

Is there any way to get stream thumbnail photo from periscope or any other .m3u8 video stream on ios? 有没有办法从潜望镜或ios上的任何其他.m3u8视频流获取流缩略图照片?

I tried to download video with requestThumbnailImagesAtTimes:timeOption: but cant get the thumbs, any suggestion? 我试着用requestThumbnailImagesAtTimes:timeOption:下载视频requestThumbnailImagesAtTimes:timeOption:但是不能得到拇指,有什么建议吗?

Thanks 谢谢

I had the same issue and I was playing the video through a UIWebView. 我有同样的问题,我正在通过UIWebView播放视频。 When I called loadRequest: the video would automatically start playing and I just wanted to show the preview image of the video with the play arrow on top of the preview image. 当我调用loadRequest:视频会自动开始播放,我只是想在预览图像顶部显示播放箭头的视频预览图像。

The way I did it was to set the mediaPlaybackRequiresUserAction property to YES like this: 我这样做的方法是将mediaPlaybackRequiresUserAction属性设置为YES,如下所示:

[cell.webView setMediaPlaybackRequiresUserAction:YES];

So this way it shows a preview image and does not automatically start playing the video stream. 因此,这会显示预览图像,并且不会自动开始播放视频流。 Might not be exactly what you were looking for since the thumbnail is covered by a play arrow, but it is an option. 由于缩略图被播放箭头覆盖,可能不是您正在寻找的,但它是一个选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM