I've scoured both the Kingfisher docs and Stack Overflow, and there is no clear answer to whether Kingfisher supports video caching. I'm new to caching videos/images in general, so if someone could expand on (1) whether caching videos with Kingfisher is possible? and (2) the difference between caching videos and images?
And if Kingfisher does not support video caching, a recommendation for tackling video caching would be appreciated. I'm using Firebase Storage for my videos, fyi.
As mentioned in Kingfisher's GitHub site:
Kingfisher is a lightweight, pure-Swift library for downloading and
caching images from the web. This project is heavily inspired by the
popular SDWebImage. It provides you a chance to use a pure-Swift
alternative in your next app.
Kingfisher is used for image downloading and caching only. If you want to cache video, Kingfisher can't help. By caching if you mean to store the video somewhere so that next time the user won't need to download again, simpliy store the video's in document folder.
Related
I'm working on a Flutter App and want to include some Tutorial Videos, which all Users have unlimited access to, so they can rewatch it any time. The Videos will be about 10-20 files with 1-5 minutes length.
I guess these amount of data will be too big to be stored as app assets, so I researched a bit and found Firebase Storage and AWS MediaStore.
Thoughts on this ? Or any recommendations - I don't want to run in the wrong direction.
I suggest hosting them on a private S3 bucket with a public CloudFront distribution in front of it for best performance. HLS file groups are fine.
This might be a bit of an obvious answer but my suggestion is that you place these videos on YouTube and mark them as Unlisted. This way you can build the URLs of these videos into your Flutter application and then load those videos with a web_view plugin that you can find on pub.dev.
I've been using ASIHttpRequest library for a while for downloading images and storing them for cache. Since it is deprecated already I'm looking for a replacement library.
My needs are to download a new image and to store it for cache only and only if image has changed on server. Otherwise to use cached image.
Is there a good and lite alternative to beloved ASIHttpRequest?
Sure there is: AFNetworking
AFNetworking is de-facto the natural replacement of ASIHTTP. It's a lovely library and version 2.0 has just being launched.
Another great library is surely SDWebImage, which provides a lot of useful functionalities for downloading and caching images.
You are clearly free to use both in your project. I personally use AFNetworking for any network operation a part from images, for which I use SDWebImage.
If you're just looking for a library to handle image downloads and caching, I recommend SDWebImage.
It includes a category class on UIImageView as well as SDWebImageManager if you're just looking to download images and not immediately place them in a UIImageView.
This link would help you it will download it and next time it will take images from cache
I want to download video from youtube. Then the downloaded video should saved and user can also play it in offline mode and user can also trim or edit that downloaded video.
I have searched a lot on Google and i find some answers but they didn't satisfy my question.
This question tell downloading video from youtube may reject your application is this true?
The screen shot from apple. YouTube Terms & Condition are also not allowing to download videos. Read section 5-B.
I have also try to load some examples for video downloading from youtube but they all failed for loading video MyTube , YouTube , SCBTube , PSYouTubeExtractor
Some questions related to youtube download. and for video trimming or cutting i am following this code .
is this downloading is possible or not ?
Downloading is, in some cases, possible, but it's against the YouTube T&Cs...so yeah, don't do it. Furthermore, even if you did implement this not all videos on YouTube are actually available in the appropriate H.264 format (e.g, videos which require advertising or content protection are often not available).
I have an iOS application, where I need to download over 60-70 videos a week of size 3-8MB each.
The issue is, how do I download these videos?
I am storing the list of videos and urls in a database.
Possible solutions:
Use a UIBackgroundTaskIdentifier, call beginBackgroundTaskWithExpirationHandler as soon as the app starts. This task will download one video.
In the endBackgroundTask I will mark that particular video as downloaded.
Concerns here are, can I start multiple UIBackgroundTaskIdentifier?
Where should I start them? In AppDelegate? A particular controller?
If I start it in a particular controller, on viewDidLoad() what will happen if the app exits?
Please guide me or provide an alternate solution.
Thanks
Use AFNetworking as ASIHTTPRequest is deprecated.
Refer AFNetworking source link.
Also refer afnetworking-downloading-multiple-files link and Does AFNetworking have backgrounding support link.
EDIT : start downloading in AppDelegate
Check AFDownloadRequestOperation for resumable download.
Refer afnetworking-pause-resume-downloading-big-files using AFDownloadRequestOperation link.
You can download multiple files with ASIHTTPRequest in the background. See the documentation here.
Please note that ASIHTTPRequest is no longer working so you can use AFNetworking.
AFNetworking is a delightful networking library for iOS and Mac OS . It's built on top ofNSURLConnection,NSOperation, and other familiarFoundation technologies`. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use.
Find the SDK here.
How does the Facebook app go about downloading/displaying the images in photo galleries? They appear to load in at varying times which would indicate some degree of threading? Surely the app doesn't spawn X amount of threads (where X is the number of pictures) as this would cause performance issues? Can anyone enlighten me as I would like to use something similar in my app (I will be regularly downloading a large amount of photos and displaying them in the app so downloading them one after another takes too long). Also, these photos change on a fairly regular basis so downloading once and cacheing isn't really an option.
Is there some kind of framework/solution around that might help me achieve something similar to Facebooks galleries?
Thanks,
Jack
The code the Facebook app uses to do this has been open-sourced as the three20 library. This functionality is provided in TTPhotoViewController.
Have a look at the LazyTableImages example from Apple. The images are downloaded asynchronously and have a reference back to where they are supposed to be displayed.
I would recommend you use this Library, ASIHTTPRequest, which is like an extended version of the NSURLRequest. I have been using it to download images for later display, asynchronously. It has a nice CACHE implementation which saves bandwidth and loading times on your app.