Nuke
Nuke copied to clipboard
Placeholder issues on Nuke Video
The placeholder view is not working correctly when using Nuke Video & 4G LTE (for lower bandwith). The placeholder view is being shown for a short amount of time, then transitions to the video. However during the view transition (from placeholder view to the video), the user sees a blank image state.
My current theory is that the placeholder view gets disabled before the video is completed loaded or the AV player is completely initalized.
I was able to resolve the issue. The issue is that in the current codebase, the placeholder gets disabled before the next view is completely ready (videoView). If I simply disable the following line, the issue disappears.
private func handle(result: Result<ImageResponse, Error>, isSync: Bool) {
resetIfNeeded()
//setPlaceholderViewHidden(true)
switch result {
case let .success(response):
display(response.container, isFromMemory: isSync)
case .failure:
setFailureViewHidden(false)
}
imageTask = nil
switch result {
case .success(let response): onSuccess?(response)
case .failure(let error): onFailure?(error)
}
onCompletion?(result)
}
closed