Comments (9)
@johanneslumpe - are there any tradeoffs here? what is the cost of throwing away & creating a new one?
from react-native-video.
@brentvatne: I am going back and forth in the Navigator in my small app, which has a page that loads Video.
Everytime i go to the page with Video, memory usage jumps by around 70MB. I think thats cos new instance is alloc'ed each time.
from react-native-video.
@eduedix - that sounds like a good enough reason right there! thanks
from react-native-video.
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.
I might be wrong about this.
from react-native-video.
@eduedix - ideally how would you like to manage this?
from react-native-video.
@eduedix it's one instance per element, not sure why you need multiple players per element?
from react-native-video.
@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 ;)
from react-native-video.
@brentvatne @johanneslumpe I am still in for only one instance. But it seems instance stays on in the background forever.
from react-native-video.
@brentvatne @eduedix I just pushed a small fix branch for this.
https://github.com/brentvatne/react-native-video/tree/feature/fix-unremoved-playerlayer
After that gets merged, you should see a significant memory drop, when removing the view with the video.
from react-native-video.
Related Issues (20)
- IOS 返回上个页面,video组件无法被销毁,后台还有声音, HOT 2
- How to customize the method of getting data from server HOT 1
- Error while changing video source (with DRM) HOT 1
- [BUG]: TVOS - fullscreen prop and ref.presentFullscreenPlayer() not working, not able to put player in fullscreen HOT 4
- [BUG]: souce params not loading network resource, but local resource can be loaded HOT 3
- [BUG]: with cropStart and cropEnd is set, audio plays from the original start position (0ms) when repeat is set to true HOT 2
- Controlbar misplaced when video list get scrolled HOT 8
- [BUG]: Coming back from PIP is slow
- Merge all event method into one simple method HOT 1
- [BUG]: The video is still playing after the component is unmounted HOT 3
- [BUG]: After destroying the player on iOS, the sound continues playing. HOT 6
- [BUG]: `onTextTracks` Callback Not Logging Subtitles Correctly Despite VTT Files Being Fetched HOT 2
- [BUG]: iOS Audio Ducking on muted or silent video HOT 5
- [BUG]: onSeek event called instantly on Android
- [BUG]: iOS – After returning to active after Mirroring, video auto-restarts HOT 1
- [BUG]: Video's not playing (black screen) specifically on iOS 17.0.2 HOT 3
- [BUG]: requireNativeComponent: "RCTVideo" was not found in the UIManager HOT 3
- [BUG]:v6 beta don‘t load mp4 HOT 3
- [BUG]: v6 don't load Internet source mp4 style file,but local source mp4 and other file style can be loaded HOT 2
- Offline DRM support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-video.