ios - AVPlayer performance - videos are flickering when scrolling a list fast -
i have list of 60 videos i'd display on list , play while user scrolling. unfortunately when i'm scrolling list fast, view totally unusable - video players flicker , there serious delay in scrolling (e.g. app freezes half second before rendering players , shows empty cells).
i tried using threads, didn't much. code snippet last tries looked way:
cell.videosnippetplayerview!.hidden = true dispatch_async(dispatch_get_global_queue(int(qos_class_user_interactive.value), 0)) { cell.setvideo(urlstring, rowno: indexpath.row) dispatch_async(dispatch_get_main_queue()) { cell.videosnippetplayerview!.hidden = false } }
i used local video files (resources), there no delay caused network.
thanks!
Comments
Post a Comment