Skip to content
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

Fortify media playback #28

Merged
merged 3 commits into from Mar 28, 2021

Conversation

FrozenWolf4887
Copy link
Contributor

This addresses various media playback issues, detailed in the respective commits.

Tested extensively on Linux with:
git@github.com:FrozenWolf4887/TeaseAIJava-TestPersonality.git
Also has been used repeatedly with the Spicy personality for over six weeks.

If there is a desire to remove the current image without having to
specify a specify an explicit blank image.
MIDI sequencers take up system resources and need to be disposed of
when no longer in use.
Tested with:
    git@github.com:FrozenWolf4887/TeaseAIJava-TestPersonality.git

This separates the media handlers into three respective modules, video,
audio, and image.  Additionally it addresses various issues found with
testing, although most of the issues only pertain to error conditions.

Video playback issues addressed:
* Disposes of MediaPlayers when finished or failed
* Fix hanging when playing invalid files
* Fix images remaining locked when playing invalid files
* Fix crash calling stopVideo() when no video is playing
* Stop previously playing video before starting a new one

Audio playback issues addressed:
* Disposes of MediaPlayers when finished or failed
* Fix hanging when playing invalid files
* Fix images being unlocked when audio has finished playing
* Fix stopAllAudio() only stopping the last playing occurrence of a file
* Cleans up list of playing audio

There is an outstanding issue that was also present in TAJ 1.3 where
calling playVideo('http://...') would often hang.  The contained
MediaPlayer object fails to issue any callbacks when the video has
finished, and its status remains as PLAYING.  Calling stop() on the
MediaPlayer does nothing.  This causes a hang in TAJ when waiting for
the video to finish either successfully or in error.  This problem may
be limited to Linux and hasn't been evaluated in Windows.  It occurs
with both OpenJFX 15.0.1 and OpenJFX 16; other versions have not been
tested.
@GodDragoner GodDragoner merged commit 3ac5fdb into GodDragoner:master Mar 28, 2021
@FrozenWolf4887 FrozenWolf4887 deleted the fortify-media-playback branch March 28, 2021 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants