Closed maximilize closed 4 years ago
On android or iOS?
Android. You can reproduce it easily when a video is playing and you hit "r" in the dev console to refresh the app.
@maximilize I will look into this
@maximilize I looked into this, and its not happening here. Maybe you are doing something wrong. When I press r
the player ejects and the video stops too.
send me your code for how you are using the video player so I can see.
I just tested your code. Sadly it's still not working. Also there is a new bug. When I change the video source, the playback of the other video does not stop. It plays in background and I had to force stop the app.
I was able to fix this issue, also the other with the non-existing cleanup code on app refresh.
You can find my changes here: https://github.com/maximilize/react-native-ijkplayer/commit/aa543aca9f8af7f5bd97b7ca9a59194217829d78
@maximilize I tested it but I was unable to reproduce the refresh issue. Should I wait for your pull-request or make the changes here myself?
@maximilize also i see that you have disabled subtitle-render? any reason for that. However the cleanup seems good. But you have renamed the package back to react-native-ijkplayer so i might not be able to merge your changes since that name is not available on npm if I publish it, which is why the name is changed.
However most of the video-player api is exposed on android I think. Almost 90% moreover the code related to equalizer etc. needs to be removed because it is unnecessary and shouldn't be there. Instead a seperate module can handle that more nicely. I am using a simple module in my app for equalizer which i will make public I think. What do you think?
Separating the equalizer module is a good idea I guess.
Setting "subtitle" to 0 was a wrong decision. In our project we don't need this setting, but of course it's useful for other projects.
I reset my project to your current master and did some small changes on top of it and created a pull request.
When refreshing the react app in dev mode the video keeps playing in background. Seems like there is some cleanup code missing.