neekeetab / CachingPlayerItem

Play and cache media content simultaneously on your iOS device
MIT License
520 stars 89 forks source link

replacing DipatchQueue.main with background queue #21

Open murad1981 opened 5 years ago

murad1981 commented 5 years ago

the following call asset.resourceLoader.setDelegate in each init method, should use background queue DispatchQueue.global(qos: .background) instead of main queue to prevent possible app freezes on the main thread which happened with me.

ppamorim commented 5 years ago

DispatchQueue..global(qos: .background) is too low and weak. Should be at least DispatchQueue.global(qos: .default).

neekeetab commented 5 years ago

I agree that the work of ResourceLoaderDelegate should be done on a global queue. At the same time, the delegate calls should be performed on the main queue.

ppamorim commented 5 years ago

@neekeetab I've changed to DispatchQueue.global(qos: .default) and it's working fine.

zackperdue commented 4 years ago

@neekeetab I try this and mine still crashes. Any more info on this?