1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00

Add qml mute before destroy

This commit is contained in:
kelteseth 2018-09-20 15:44:29 +02:00
parent 2e89fda91f
commit a2f6c82ee0
3 changed files with 10 additions and 2 deletions

View File

@ -7,6 +7,13 @@ Rectangle {
Connections {
target: mainwindow
onQmlExit:{
webView.runJavaScript(
"var videoPlayer = document.getElementById('videoPlayer'); videoPlayer.volume = 0;")
mainwindow.destroyThis()
}
onFillModeChanged: {
//TODO
}

View File

@ -104,7 +104,7 @@ MainWindow::MainWindow(int i, QString projectPath, QString id, QString decoder,
}
//Hide first to avoid flickering
ShowWindow(m_worker_hwnd, SW_HIDE);
//ShowWindow(m_worker_hwnd, SW_HIDE);
ShowWindow(m_hwnd, SW_HIDE);
MoveWindow(m_hwnd, screen->geometry().x() + offsetX, screen->geometry().y() + offsetY, screen->size().width(), screen->size().height(), true);
SetParent(m_hwnd, m_worker_hwnd);
@ -139,7 +139,7 @@ void MainWindow::init()
#ifdef Q_OS_WIN
// This needs to be set in this order or
// the window will be opened as fullscreen!
ShowWindow(m_worker_hwnd, SW_SHOWDEFAULT);
//ShowWindow(m_worker_hwnd, SW_SHOWDEFAULT);
ShowWindow(m_hwnd, SW_SHOWDEFAULT);
#endif
}

View File

@ -225,6 +225,7 @@ signals:
void playbackRateChanged(float playbackRate);
void qmlSceneValueReceived(QString key, QString value);
void decoderChanged(QString decoder);
void qmlExit();
private:
#ifdef Q_OS_WIN