Nuke icon indicating copy to clipboard operation
Nuke copied to clipboard

Placeholder issues on Nuke Video

Open lschaupp opened this issue 1 year ago • 2 comments
trafficstars

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.

lschaupp avatar Dec 25 '23 14:12 lschaupp

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)
}

lschaupp avatar Dec 27 '23 10:12 lschaupp

closed

lschaupp avatar Dec 27 '23 10:12 lschaupp