New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reuse same AVPlayer instance #18
Comments
@johanneslumpe - are there any tradeoffs here? what is the cost of throwing away & creating a new one? |
@brentvatne: I am going back and forth in the Navigator in my small app, which has a page that loads Video. |
@eduedix - that sounds like a good enough reason right there! thanks |
It would be indeed useful to have an API, which could let me kill the instance. It seems having only 1 instance is still not the optimum solution. |
@eduedix - ideally how would you like to manage this? |
@eduedix it's one instance per element, not sure why you need multiple players per element? |
@brentvatne at the very least we'd save the cost of allocating a new instance. It might not be a huge optimization, but less allocation is always better ;) |
@brentvatne @johanneslumpe I am still in for only one instance. But it seems instance stays on in the background forever. |
@brentvatne @eduedix I just pushed a small fix branch for this. After that gets merged, you should see a significant memory drop, when removing the view with the video. |
This PR adds core actions to enable or disable screenshots Jira: VEX-6540 https://jira.tenkasu.net/browse/VEX-6540 velocity PR: crunchyroll/velocity#2248 New core actions were added to control the player surface and mark it as secure. Sending the prop to react-native-video will recreate the surface of the player changing it to a SurfaceView and enabling security Reviews Major reviewer (domain expert): @nickfujita Minor reviewer: @armadilio3
…tlin deprecated kotlin plugin updata
We are currently throwing away and re-creating the AVPlayer. It would be nicer if we just reused the same instance and exchanged the item if the source changes.
The text was updated successfully, but these errors were encountered: