I am loading facebook images and videos in a UICollectionView using SDWebImage images are loading fast whereas when there is a video in the CollectionView ,there is a delay in loading
[fbImageView sd_setImageWithURL:assetURl placeholderImage:nil options:0 completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType,NSURL *url) {
fbImageView.image=image;
}];
this is for loading videos and images
On the SDWebImage github project is explained that their library is intendeed to manage images ( also gif for example ) but is not mentioned Video.
Said that, normally is not a good idea to load video directly into a table or collection view, because of their size and, in general the resulting performance impact on the mobile device.
Instead I would suggest you to download a replacing thumbnail preview of that video, as simple image, with his unique url, in order to be properly managed by the SDWebImage library, and then showing the video into a proper player once the user tap on the preview image to see the video ( for istance the preview image could have an additional overlay with the classic player triangle on it ).
You can then download the video in background and store it locally or just playing it as soon as requested (depending on your necessity of playing video also in offline or not ).
Hope it helps