Open insanj opened 6 years ago
Note: I would use the new Swift framework but it is not Objective-C compatible.
Hi Julian!
I’ve been working on several projects that have been pulling me away from Open Source, sorry. But yes, I can investigate the issue, however if you find a solution and PR it to the dev branch, I can review it.
My Swift version is incomplete, and I also want to make sure all is Objective-C compatible. But there was a lot in terms of video playing that is vastly improved in that project.
I will try to get to these issues as soon as I can, but again, if you find a solution and would like to PR, I can definitely review it.
After using a few
ABMediaView
instances, they all break until restarting the app. This is easily reproducible. Create a newABMediaView
instance and present it, wait for it to load and begin playing, then present another instance. After a dozen or so of these instances, they will all fail with the error:This Stackoverflow post explains the issue as being related to the reuse of AVFoundation resources:
What can I do to dump the AVFoundation resources that
ABMediaView
is blocking up? CallingresetVariables
andresetMediaInView
inmediaViewDidDismiss
was a hopeful solution of mine that didn't seem to do anything.Edit: According to this post, it seems like using
AVPlayerLayer
'sreplaceCurrentItem
would work... although I'm not sure what to do when a layer is not actually being reused (like in the case of multiple media views):