FluentUI/example/T_MediaPlayer.qml

47 lines
998 B
QML
Raw Normal View History

2023-03-25 13:35:21 +08:00
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick.Window 2.15
import QtGraphicalEffects 1.15
import FluentUI 1.0
2023-03-24 15:21:47 +08:00
FluScrollablePage{
2023-03-24 18:25:13 +08:00
title:"MediaPlayer"
2023-03-28 17:53:46 +08:00
leftPadding:10
rightPadding:10
bottomPadding:20
2023-03-24 15:21:47 +08:00
2023-03-25 20:45:33 +08:00
onVisibleChanged: {
if(visible){
player.play()
}else{
player.pause()
}
}
2023-03-24 15:21:47 +08:00
FluArea{
width: parent.width
2023-03-24 18:25:13 +08:00
height: 320
2023-03-24 15:21:47 +08:00
Layout.topMargin: 20
paddings: 10
ColumnLayout{
anchors{
verticalCenter: parent.verticalCenter
left:parent.left
}
FluMediaPlayer{
2023-03-25 20:45:33 +08:00
id:player
2023-03-27 18:24:35 +08:00
// source:"http://mirror.aarnet.edu.au/pub/TED-talks/911Mothers_2010W-480p.mp4"
source:"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"
2023-03-25 23:28:48 +08:00
// source:"http://video.chinanews.com/flv/2019/04/23/400/111773_web.mp4"
2023-03-24 15:21:47 +08:00
}
}
}
}