mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Isolate postbox
This commit is contained in:
@@ -20,7 +20,9 @@ public func preloadVideoResource(postbox: Postbox, resourceReference: MediaResou
|
||||
|> deliverOn(queue)
|
||||
|> mapToSignal { result -> Signal<Never, MediaFrameSourceSeekError> in
|
||||
let result = result.syncWith({ $0 })
|
||||
if let videoBuffer = result?.buffers.videoBuffer, let impl = source.syncWith({ $0 }) {
|
||||
if let videoBuffer = result.buffers.videoBuffer {
|
||||
let impl = source.syncWith({ $0 })
|
||||
|
||||
return impl.ensureHasFrames(until: min(duration, videoBuffer.duration.seconds))
|
||||
|> ignoreValues
|
||||
|> castError(MediaFrameSourceSeekError.self)
|
||||
|
||||
Reference in New Issue
Block a user