Skip to content

Commit

Permalink
Adjust volume on video intensity change
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Dec 9, 2024
1 parent 6450d44 commit 2d857c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion qmlui/qml/fixturesfunctions/VideoContext.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import QtQuick 2.0
import QtMultimedia 5.8
import QtMultimedia 5.14

import org.qlcplus.classes 1.0
import "."
Expand Down Expand Up @@ -149,6 +149,13 @@ Rectangle
id: player
//source: "sourceURL"
autoPlay: true
volume: video.intensity
/* Qt 6.8
audioOutput:
AudioOutput {
volume: video.intensity
}
*/

onStopped:
{
Expand Down
2 changes: 2 additions & 0 deletions ui/src/videoprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ void VideoWidget::slotBrightnessAdjust(int value)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
if (m_videoWidget != NULL)
m_videoWidget->setBrightness(value);
if (m_videoPlayer)
m_videoPlayer->setVolume(value + 100);
#else
Q_UNUSED(value)
#endif
Expand Down

0 comments on commit 2d857c8

Please sign in to comment.