This commit is contained in:
zhuzihcu 2023-03-31 18:11:55 +08:00
commit d2e3e6dd4b
2 changed files with 10 additions and 7 deletions

View File

@ -18,7 +18,7 @@ Window {
"/chat":"qrc:/page/ChatPage.qml", "/chat":"qrc:/page/ChatPage.qml",
"/media":"qrc:/page/MediaPage.qml", "/media":"qrc:/page/MediaPage.qml",
} }
FluApp.initialRoute = "/media" FluApp.initialRoute = "/"
FluApp.run() FluApp.run()
} }

View File

@ -43,10 +43,9 @@ Rectangle {
onMediaStatusChanged: onMediaStatusChanged:
(status)=> { (status)=> {
if(status===2){ if(status===2){
mediaplayer.play()
}else if(status===5){
slider.maxValue = mediaplayer.duration slider.maxValue = mediaplayer.duration
showControl = true showControl = true
mediaplayer.play()
} }
} }
} }
@ -64,14 +63,18 @@ Rectangle {
height: 100 height: 100
y:showControl ? control.height - 110 : control.height y:showControl ? control.height - 110 : control.height
anchors{ anchors{
left: parent.left horizontalCenter: parent.horizontalCenter
right: parent.right
leftMargin: 10
rightMargin: 10
} }
width: 460
opacity: showControl
MouseArea{ MouseArea{
anchors.fill: parent anchors.fill: parent
} }
Behavior on opacity{
NumberAnimation{
duration: 150
}
}
Behavior on y{ Behavior on y{
NumberAnimation{ NumberAnimation{
duration: 150 duration: 150