I'm having an issue with MediaPlayer where if I try to play a sound, it works perfectly in debug mode - however if I do a release build & run it I get the following exception:
Here's the code I use:
I've done some searching on the web & found a few references to this issue, however I haven't been able to find a fix. Any suggestions?
- Colin.
MediaException: UNKNOWN : [com.sun.media.jfxmediaimpl.platform.gstreamer.GSTMediaPlayer@5c13eb0e] ERROR_MEDIA_INVALID: ERROR_MEDIA_INVALID
at javafx.scene.media.MediaException.getMediaException(MediaException.java:160)
at javafx.scene.media.MediaPlayer$_MediaErrorListener.onError(MediaPlayer.java:2615)
at com.sun.media.jfxmediaimpl.NativeMediaPlayer$EventQueueThread.HandleErrorEvents(NativeMediaPlayer.java:691)
at com.sun.media.jfxmediaimpl.NativeMediaPlayer$EventQueueThread.run(NativeMediaPlayer.java:425)
Here's the code I use:
B4X:
Private MP As MediaPlayer
MP.Initialize("", File.GetUri(File.DirAssets, "roll.wav"))
MP.Stop
MP.Play
I've done some searching on the web & found a few references to this issue, however I haven't been able to find a fix. Any suggestions?
- Colin.