Fix palette access and QMediaPlayer errors
This commit is contained in:
parent
e85a1d4aeb
commit
54e2295c21
88 changed files with 426 additions and 480 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue