summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/timeline/InputBar.cpp8
-rw-r--r--src/ui/MxcMediaProxy.cpp15
-rw-r--r--src/voip/CallManager.cpp8
3 files changed, 16 insertions, 15 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp
index 2fd2d21a..af974592 100644
--- a/src/timeline/InputBar.cpp
+++ b/src/timeline/InputBar.cpp
@@ -1033,12 +1033,12 @@ MediaUpload::MediaUpload(std::unique_ptr<QIODevice> source_,
         }
 
         connect(mediaPlayer,
-&QMediaPlayer::error,
+&QMediaPlayer::errorOccurred,
                 this,
-                [mediaPlayer]() {
+                [](QMediaPlayer::Error error, QString errorString) {
                     nhlog::ui()->debug("Media player error {} and errorStr {}",
-                                       mediaPlayer->error(),
-                                       mediaPlayer->errorString().toStdString());
+                                       error,
+                                       errorString.toStdString());
                 });
         connect(mediaPlayer,
                 &QMediaPlayer::mediaStatusChanged,
diff --git a/src/ui/MxcMediaProxy.cpp b/src/ui/MxcMediaProxy.cpp
index e10cb846..dd5d81a9 100644
--- a/src/ui/MxcMediaProxy.cpp
+++ b/src/ui/MxcMediaProxy.cpp
@@ -25,13 +25,14 @@ MxcMediaProxy::MxcMediaProxy(QObject *parent)
 {
     connect(this, &MxcMediaProxy::eventIdChanged, &MxcMediaProxy::startDownload);
     connect(this, &MxcMediaProxy::roomChanged, &MxcMediaProxy::startDownload);
-    connect(this,
-            &MxcMediaProxy::error,
-            [this]() {
-                nhlog::ui()->info("Media player error {} and errorStr {}",
-                                  error(),
-                                  this->errorString().toStdString());
-            });
+        connect(this,
+&QMediaPlayer::errorOccurred,
+                this,
+                [](QMediaPlayer::Error error, QString errorString) {
+                    nhlog::ui()->debug("Media player error {} and errorStr {}",
+                                       error,
+                                       errorString.toStdString());
+                });
     connect(this, &MxcMediaProxy::mediaStatusChanged, [this](QMediaPlayer::MediaStatus status) {
         nhlog::ui()->info("Media player status {} and error {}", status, this->error());
     });
diff --git a/src/voip/CallManager.cpp b/src/voip/CallManager.cpp
index 0ef14db9..9a610819 100644
--- a/src/voip/CallManager.cpp
+++ b/src/voip/CallManager.cpp
@@ -173,11 +173,11 @@ CallManager::CallManager(QObject *parent)
       });
 
     connect(&player_,
-            &QMediaPlayer::error,
+            &QMediaPlayer::errorOccurred,
             this,
-            [this]() {
+            [this](QMediaPlayer::Error error, QString errorString) {
                 stopRingtone();
-                switch (player_.error()) {
+                switch (error) {
                 case QMediaPlayer::FormatError:
                 case QMediaPlayer::ResourceError:
                     nhlog::ui()->error("WebRTC: valid ringtone file not found");
@@ -186,7 +186,7 @@ CallManager::CallManager(QObject *parent)
                     nhlog::ui()->error("WebRTC: access to ringtone file denied");
                     break;
                 default:
-                    nhlog::ui()->error("WebRTC: unable to play ringtone");
+                    nhlog::ui()->error("WebRTC: unable to play ringtone, {}", errorString.toStdString());
                     break;
                 }
             });