suggestion: videoCover OR video component
Opened this issue · 1 comments
b-asaf commented
Hi @abbasfreestyle ,
I'd like to recommend small update that can improve application performance when using this package.
Once again, great package...I am using it and its solved my fullScreen
issue
I think that the rendering should be done like this:
renderVideoCover() {
...render the video cover with play button and all the styling
}
renderVideoPlayer() {
...render the video player and controls
}
render() {
if (showVideoCover) return this.renderVideoCover();
return this.renderVideo();
}
That way when the app navigate to a screen with the video component it won't try to fetch the video immediately but only after the user tap the play button.
This will:
- reduce the amount of video fetching - reduce data transfer.
- in case of an error, for example network error - will show the error just after the user tap the play button and not when the user navigate to a screen with the video component.
abbasfreestyle commented
Hi @assafb81,
I think this is a good suggestion, I'll look to add this in the next release. Thank you :)