1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-07 22:18:30 -04:00
Files
DankMaterialShell/quickshell/Widgets/DankAnimatedAlbumArt.qml
T
FormalSnake 401872881e media: add opt-in Apple Music animated album covers (#2918)
* media: add opt-in Apple Music animated album covers

* media: validate itunes match, touch files for cache

---------

Co-authored-by: bbedward <bbedward@gmail.com>
2026-08-06 14:47:51 -04:00

43 lines
1.1 KiB
QML

import QtQuick
import QtMultimedia
import Quickshell.Widgets
import qs.Services
// Loaded by url so a missing QtMultimedia degrades to the static art underneath.
ClippingRectangle {
id: root
radius: width / 2
color: "transparent"
contentInsideBorder: true
border.color: MediaAccentService.accent
border.width: 2
// Reveal only while frames are flowing; the static art beneath covers load, stall and error.
opacity: video.hasVideo && video.playbackState === MediaPlayer.PlayingState && video.error === MediaPlayer.NoError ? 1 : 0
visible: opacity > 0
Behavior on opacity {
NumberAnimation {
duration: 300
easing.type: Easing.InOutQuad
}
}
Video {
id: video
anchors.fill: parent
source: AppleMusicArtService.animatedArtUrl
fillMode: VideoOutput.PreserveAspectCrop
loops: MediaPlayer.Infinite
muted: true
onSourceChanged: {
if (source != "")
play();
}
Component.onCompleted: {
if (source != "")
play();
}
}
}