複数のビデオを再生し、それらを一度に制御する必要があるプロジェクトに取り組んでいます。これまでのところ、qmlscene をクリックすると、アプリはすべてのビデオを再生します。ここで、再生/一時停止ボタン、シーク ボタン、速度と進行状況用のスライダー バーを追加したいと考えています。
私の現在のコードは次のとおりです。
import QtQuick 2.1
import QtMultimedia 5.0
Rectangle{
id:mainRect
width: 1900
height: 950
color:"darkgrey"
Video{
id:video1
x:0
y:50
width: mainRect.width/3
height: 360
source :"F:/TestingVideos/Cash Office Camera/N01000713.mp4"
}
Video{
id:video2
x:450
y:50
width: mainRect.width/3
height: 360
source :"F:/TestingVideos/Cash Office Camera/N02000713.mp4"
}
Video{
id:video3
x:900
y:50
width: mainRect.width/3
height: 360
source :"F:/TestingVideos/Cash Office Camera/N03000713.mp4"
}
Video{
id:video4
x:1350
y:50
width: mainRect.width/3
height: 360
source :"F:/TestingVideos/Cash Office Camera/N04000713.mp4"
}
Video{
id:video5
x:0
y:420
width: mainRect.width/3
height: 360
source :"F:/TestingVideos/Cash Office Camera/N05000713.mp4"
}
Video{
id:video6
x:450
y:420
width: mainRect.width/3
height: 360
source :"F:/TestingVideos/Cash Office Camera/N06000713.mp4"
}
Video{
id:video7
x:900
y:420
width: mainRect.width/3
height: 360
source :"F:/TestingVideos/Cash Office Camera/N07000713.mp4"
}
Video{
id:video8
x:1350
y:420
width: mainRect.width/3
height: 360
source :"F:/TestingVideos/Cash Office Camera/N08000714.mp4"
}
MouseArea {
x: 26
anchors.rightMargin: 0
anchors.bottomMargin: 0
anchors.leftMargin: 0
anchors.topMargin: 0
anchors.fill: parent
onClicked: {
video1.play()
video2.play()
video3.play()
video4.play()
video5.play()
video6.play()
video7.play()
video8.play()
}
}
}