Skip to content

Commit ec7bf47

Browse files
Andrii BoichukAndrii Boichuk
authored andcommitted
Fix getPlayerVolume
1 parent 23d8ceb commit ec7bf47

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/Test/VideoTest.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ VideoTestWidget::VideoTestWidget(QWidget *parent) :
1010
videoWidget = new QVideoWidget;
1111
videoWidget->setObjectName("videoPlayer");
1212

13-
mediaPlayer->setVideoOutput(this->videoWidget);
14-
1513
playButton = new QPushButton;
1614
playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
1715
playButton->setEnabled(false);
@@ -55,6 +53,8 @@ VideoTestWidget::VideoTestWidget(QWidget *parent) :
5553
}
5654
QSize resolution = mediaPlayer->media().canonicalResource().resolution();
5755
this->setGeometry(0,0, resolution.width(), resolution.height());
56+
57+
mediaPlayer->setVideoOutput(this->videoWidget);
5858
}
5959

6060
VideoTestWidget::~VideoTestWidget()

src/webdriver/extension_qt/quick2_view_executor.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -882,10 +882,7 @@ void Quick2ViewCmdExecutor::GetPlayerVolume(const ElementId &element, double *vo
882882
return;
883883
}
884884

885-
int volumeInt;
886-
volumeValue->GetAsInteger(&volumeInt);
887-
888-
*volume = volumeInt/100.0;
885+
volumeValue->GetAsDouble(volume);
889886
}
890887

891888
void Quick2ViewCmdExecutor::SetPlayerVolume(const ElementId &element, double volume, Error **error)

0 commit comments

Comments
 (0)