-
Notifications
You must be signed in to change notification settings - Fork 52
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
NPE when enabling looping after creating the video player on Android #101
Comments
You added it to the
You mean I change the example to this: videoPlayer = VideoPlayerCreator.createVideoPlayer();
videoPlayer.setLooping(true); then yes I get also an exception:
When I look at the commits I see @dasisdormax removed the locking. Any reason why? |
Good find! Actually, many functions (setLooping, setVolume, isPlaying, getCurrentTimestamp, ...) should cause this crash on Android when called directly after the constructor. These functions never checked if the internal player was already created (both before and after c0fbd06). I don't think blocking the render thread until everything is created s an option. A slightly inconvenient fix would be to run these functions with |
Oh, how could I forget this, what an obvious error, damn. Thanks for reply. |
I think using
for other void functions, we can also try this way. And for another functions which have returning value, we could just return a default value if |
Do you have a reason? |
And when I called |
The repo(https://oss.sonatype.org/content/repositories/releases) has no path to "com.badlogicgames.gdx-video", and it causes my implementation get errors, you should update your README and add new available dependency.
The text was updated successfully, but these errors were encountered: