You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make CDNRequester a constructor dependency of StreamMediaLoader (#4070)
* Make CDNRequester a constructor dependency of StreamMediaLoader
Instead of passing CDNRequester through ImageLoadOptions / VideoLoadOptions
on every call, it is now provided once via StreamMediaLoader's init.
- Add resolveFileURL to MediaLoader protocol for CDN URL resolution
- Deprecate cdnRequester on Components (UIKit) and ImageLoadOptions/VideoLoadOptions
- Update all call sites to use simplified option constructors
- Add deprecated shims for backward compatibility
* Enrich MediaLoaderImage and DownloadedImage with animated image data
Add isAnimated and animatedImageData fields so that callers like
StreamAsyncImage can get GIF metadata through MediaLoader instead of
bypassing it with a parallel Nuke pipeline.
* Add cachingKey to MediaLoaderImage for sync cache lookups
StreamMediaLoader now passes the CDN cachingKey through the result so
UI layers can maintain their own synchronous cache lookup tables without
needing direct access to CDNRequester.
* Rename resolveFileURL to loadFile with options and MediaLoaderFile result
Aligns the file loading API with the rest of MediaLoader:
- loadFile(at:options:completion:) with FileLoadOptions and MediaLoaderFile
- MediaLoaderFile carries the resolved URL and optional headers
* Remove deprecated CDNRequester shims
This is a breaking change: remove all backward-compatibility shims for
the old cdnRequester-in-options pattern. Removed:
- StreamMediaLoader.init(downloader:)
- ImageLoadOptions.init(resize:cdnRequester:)
- VideoLoadOptions.init(cdnRequester:)
- Components.cdnRequester
- ImageLoaderOptions.init(resize:placeholder:cdnRequester:)
- ImageDownloadOptions.init(resize:cdnRequester:)
- MediaLoader+UIKit loadImage(into:from:maxResolutionInPixels:cdnRequester:)
* Replace loadFile with loadFileRequest returning MediaLoaderFileRequest
Replaces the loadFile(at:options:) method with loadFileRequest(for:options:)
that returns a MediaLoaderFileRequest wrapping a URLRequest with CDN-resolved
URL and headers. The download pipeline (AttachmentDownloader, APIClient,
MessageUpdater, Chat, MessageController) now accepts a URLRequest instead of
a separate URL + headers, keeping CDN concerns encapsulated in MediaLoader.
* Only set animatedImageData for GIF images in StreamImageDownloader
* Add convenience MediaLoader extensions that omit options parameter
* Use convenience MediaLoader methods without empty options
* Fix swiftformat
* Update changelog for CDNRequester as StreamMediaLoader dependency
* Remove isAnimated property from DownloadedImage and MediaLoaderImage
* Reorder StreamMediaLoader init: downloader first, cdnRequester second
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3
3
4
4
# Upcoming
5
5
6
+
## StreamChatUI
6
7
### 🔄 Changed
8
+
-`CDNRequester` is now passed in the constructor of `StreamMediaLoader` instead of `Components`[#4070](https://github.com/GetStream/stream-chat-swift/pull/4070)
0 commit comments