2023年2月16日18:09:35 音乐播放修改

master
zhangmeng 2023-02-16 18:19:19 +08:00
parent 4da2cadd89
commit d8696608e0
2 changed files with 3 additions and 6 deletions

View File

@ -143,11 +143,6 @@ public class MusicController {
@FXML
private Slider sl_vol;
/**
*
*/
private SpectrumController st = new SpectrumController();
/**
*
*/
@ -505,6 +500,7 @@ public class MusicController {
public void myPlay() {
this.mp.dispose();
this.mp = new MediaPlayer((Media) this.medias.get(this.playindex.get()));
initProgressBar(mp);
this.mp.setOnReady(new Runnable() {
public void run() {
MusicController.this.mp.play();
@ -547,6 +543,7 @@ public class MusicController {
}
}
});
}
public void initListView(){

View File

@ -53,7 +53,7 @@
<Slider fx:id="sl_vol" prefHeight="14.0" prefWidth="148.0" />
</children>
</HBox>
<RXMediaProgressBar layoutX="92.0" layoutY="542.0" prefHeight="11.0" prefWidth="961.0" AnchorPane.bottomAnchor="71.0" AnchorPane.leftAnchor="185.0" AnchorPane.rightAnchor="101.0" />
<RXMediaProgressBar fx:id="progressBar" layoutX="92.0" layoutY="542.0" prefHeight="11.0" prefWidth="961.0" AnchorPane.bottomAnchor="71.0" AnchorPane.leftAnchor="185.0" AnchorPane.rightAnchor="101.0" />
<ScrollPane fx:id="scrollPane" prefHeight="551.0" prefWidth="300.0" AnchorPane.bottomAnchor="98.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0">
<content>
<ListView fx:id="listView" prefHeight="${scrollPane.height}" prefWidth="295.0" />