2023年2月16日18:09:35 音乐播放修改
parent
4da2cadd89
commit
d8696608e0
|
|
@ -143,11 +143,6 @@ public class MusicController {
|
||||||
@FXML
|
@FXML
|
||||||
private Slider sl_vol;
|
private Slider sl_vol;
|
||||||
|
|
||||||
/**
|
|
||||||
* 音频光谱类
|
|
||||||
*/
|
|
||||||
private SpectrumController st = new SpectrumController();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 循环类型
|
* 循环类型
|
||||||
*/
|
*/
|
||||||
|
|
@ -505,6 +500,7 @@ public class MusicController {
|
||||||
public void myPlay() {
|
public void myPlay() {
|
||||||
this.mp.dispose();
|
this.mp.dispose();
|
||||||
this.mp = new MediaPlayer((Media) this.medias.get(this.playindex.get()));
|
this.mp = new MediaPlayer((Media) this.medias.get(this.playindex.get()));
|
||||||
|
initProgressBar(mp);
|
||||||
this.mp.setOnReady(new Runnable() {
|
this.mp.setOnReady(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
MusicController.this.mp.play();
|
MusicController.this.mp.play();
|
||||||
|
|
@ -547,6 +543,7 @@ public class MusicController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initListView(){
|
public void initListView(){
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
<Slider fx:id="sl_vol" prefHeight="14.0" prefWidth="148.0" />
|
<Slider fx:id="sl_vol" prefHeight="14.0" prefWidth="148.0" />
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</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">
|
<ScrollPane fx:id="scrollPane" prefHeight="551.0" prefWidth="300.0" AnchorPane.bottomAnchor="98.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
<content>
|
<content>
|
||||||
<ListView fx:id="listView" prefHeight="${scrollPane.height}" prefWidth="295.0" />
|
<ListView fx:id="listView" prefHeight="${scrollPane.height}" prefWidth="295.0" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue