Skip to content

Commit 43fbc10

Browse files
committed
Update the readme about the Video Asset
1 parent fe25673 commit 43fbc10

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,24 @@ imageView.sd_setImage(with: photosURL, placeholderImage: nil, context: [.customM
129129
#### Animated Images
130130
SDWebImagePhotosPlugin supports GIF images stored in Photos Library as well. Just use the same API as normal images to query the asset. We will query the image data and decode the animated images (compatible with `UIImageView` as well as [SDAnimatedImageView](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#animated-image-50))
131131

132+
133+
#### Video Asset
134+
SDWebImagePhotosPlugin supports to load Video Asset poster as well. By default we don't allow non-image type asset, to avoid the accidentally pick of wrong Asset. But you can disable this limit as well.
135+
136+
+ Objective-C
137+
138+
```objectivec
139+
SDWebImagePhotosLoader.sharedLoader.requestImageAssetOnly = NO;
140+
```
141+
142+
+ Swift
143+
144+
```swift
145+
SDWebImagePhotosLoader.shared.requestImageAssetOnly = false
146+
```
147+
148+
Then just request the PHAssets or using the fetch options, which the media type is `.video`.
149+
132150
#### Fetch/Request Options
133151
To specify options like `PHFetchOptions` or `PHImageRequestOptions` for Photos Library. Either to change the correspond properties in loader, or provide a context options for each image request.
134152

0 commit comments

Comments
 (0)