diff --git a/example/App.qml b/example/App.qml index 235c77c3..db0bb47a 100644 --- a/example/App.qml +++ b/example/App.qml @@ -18,7 +18,7 @@ Window { "/chat":"qrc:/page/ChatPage.qml", "/media":"qrc:/page/MediaPage.qml", } - FluApp.initialRoute = "/media" + FluApp.initialRoute = "/" FluApp.run() } diff --git a/src/controls/FluMediaPlayer.qml b/src/controls/FluMediaPlayer.qml index 87a5230f..12b8e801 100644 --- a/src/controls/FluMediaPlayer.qml +++ b/src/controls/FluMediaPlayer.qml @@ -43,10 +43,9 @@ Rectangle { onMediaStatusChanged: (status)=> { if(status===2){ - mediaplayer.play() - }else if(status===5){ slider.maxValue = mediaplayer.duration showControl = true + mediaplayer.play() } } } @@ -64,14 +63,18 @@ Rectangle { height: 100 y:showControl ? control.height - 110 : control.height anchors{ - left: parent.left - right: parent.right - leftMargin: 10 - rightMargin: 10 + horizontalCenter: parent.horizontalCenter } + width: 460 + opacity: showControl MouseArea{ anchors.fill: parent } + Behavior on opacity{ + NumberAnimation{ + duration: 150 + } + } Behavior on y{ NumberAnimation{ duration: 150