mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01:00
Remove no longer used Screens -> moved to ScreenPlayWindow
This commit is contained in:
parent
0dc4507f60
commit
ab345f15e8
@ -1,11 +0,0 @@
|
||||
import QtQuick 2.9
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: screenVideo
|
||||
color: "gray"
|
||||
|
||||
ScreenVideoPlayer {
|
||||
id: screenVideoPlayer
|
||||
}
|
||||
}
|
@ -1,101 +0,0 @@
|
||||
import QtQuick 2.9
|
||||
import QtAV 1.7
|
||||
|
||||
Rectangle {
|
||||
color: "black"
|
||||
id: screenVideoPlayer
|
||||
anchors.fill: parent
|
||||
property string videoPath
|
||||
property bool isPlaying: false
|
||||
onIsPlayingChanged: {
|
||||
if(isPlaying){
|
||||
player.play()
|
||||
} else {
|
||||
player.pause()
|
||||
}
|
||||
}
|
||||
|
||||
Connections{
|
||||
target: wallpaper
|
||||
onPrepareDestroy:{
|
||||
player.stop();
|
||||
wallpaper.destroyWindow()
|
||||
}
|
||||
|
||||
onVolumeChanged:{
|
||||
player.volume = wallpaper.volume
|
||||
}
|
||||
onIsPlayingChanged:{
|
||||
if(wallpaper.isPlaying){
|
||||
player.play()
|
||||
} else {
|
||||
player.pause()
|
||||
}
|
||||
}
|
||||
onDecoderChanged:{
|
||||
player.videoCodecPriority = [decoder]
|
||||
}
|
||||
onFillModeChanged:{
|
||||
if(fillMode === "Stretch"){
|
||||
videoOut.fillMode = VideoOutput2.Stretch
|
||||
} else if(fillMode === "PreserveAspectFit"){
|
||||
videoOut.fillMode = VideoOutput2.PreserveAspectFit
|
||||
}else if(fillMode === "PreserveAspectCrop"){
|
||||
videoOut.fillMode = VideoOutput2.PreserveAspectCrop
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
player.source = Qt.resolvedUrl("file:///" + wallpaper.absoluteFilePath)
|
||||
player.play()
|
||||
screenVideoPlayer.state = "playing"
|
||||
}
|
||||
|
||||
VideoOutput2 {
|
||||
id: videoOut
|
||||
anchors.fill: parent
|
||||
source: player
|
||||
opacity: 0
|
||||
opengl: true
|
||||
fillMode: VideoOutput.Stretch
|
||||
}
|
||||
|
||||
MediaPlayer {
|
||||
id: player
|
||||
videoCodecPriority: ["CUDA", "VAAPI", "D3D11", "DXVA", "FFmpeg"]
|
||||
loops: MediaPlayer.Infinite
|
||||
volume: 0
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "playing"
|
||||
PropertyChanges {
|
||||
target: videoOut
|
||||
opacity: 1
|
||||
}
|
||||
PropertyChanges {
|
||||
target: player
|
||||
volume: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
Transition {
|
||||
from: ""
|
||||
to: "playing"
|
||||
|
||||
OpacityAnimator {
|
||||
target: videoOut
|
||||
duration: 300
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
NumberAnimation {
|
||||
target: player
|
||||
property: "volume"
|
||||
duration: 300
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user