Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Javafx mediaPlayer 运行 mp4 电影。我的电影结束时如何收到通知?我只想在电影结束后采取行动。
您可以使用
MediaPlayer player = new MediaPlayer(yourmediafile); player.setOnEndOfMedia(new Runnable() { public void run() { //Code to run } });
为达到这个