1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-06 19:12:30 +01:00

Refactor platform check

This commit is contained in:
Elias Steurer 2021-11-13 14:26:48 +01:00
parent e87c6a4d54
commit b78f20a4bf

View File

@ -18,10 +18,16 @@ Rectangle {
Wallpaper.terminate()
}
// macOS only supports h264 via the native Qt MM
if (Qt.platform === "osx" && (Wallpaper.videoCodec === VideoCodec.VP8
|| Wallpaper.videoCodec === VideoCodec.VP9)) {
loader.source = "qrc:/ScreenPlayWallpaper/qml/MultimediaWebView.qml"
} else {
if (Qt.platform.os === "osx") {
if ((Wallpaper.videoCodec === VideoCodec.VP8
|| Wallpaper.videoCodec === VideoCodec.VP9)) {
loader.source = "qrc:/ScreenPlayWallpaper/qml/MultimediaWebView.qml"
} else {
loader.source = "qrc:/ScreenPlayWallpaper/qml/MultimediaView.qml"
}
}
if (Qt.platform.os === "windows") {
loader.source = "qrc:/ScreenPlayWallpaper/qml/MultimediaView.qml"
}
fadeIn()