Replace mediafiles

fixes #1590
pull/1614/head
Nicolas Werner 1 year ago
parent 31aebb33ae
commit 0e0a93914e
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 5
      resources/media/README.txt
  2. BIN
      resources/media/callend.mscz
  3. BIN
      resources/media/callend.ogg
  4. BIN
      resources/media/ring.ogg
  5. BIN
      resources/media/ringback.mscz
  6. BIN
      resources/media/ringback.ogg
  7. BIN
      resources/media/ringtone.mscz
  8. 10
      src/voip/CallManager.cpp

@ -1,5 +0,0 @@
The below media files were obtained from https://github.com/matrix-org/matrix-react-sdk/tree/develop/res/media
callend.ogg
ringback.ogg
ring.ogg

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -7,8 +7,8 @@
#include <chrono> #include <chrono>
#include <cstdint> #include <cstdint>
#include <cstdlib> #include <cstdlib>
#include <memory>
#include <QAudioOutput>
#include <QGuiApplication> #include <QGuiApplication>
#include <QUrl> #include <QUrl>
@ -186,10 +186,13 @@ CallManager::CallManager(QObject *parent)
connect( connect(
&CallDevices::instance(), &CallDevices::devicesChanged, this, &CallManager::devicesChanged); &CallDevices::instance(), &CallDevices::devicesChanged, this, &CallManager::devicesChanged);
auto audioOutput = new QAudioOutput(&player_);
player_.setAudioOutput(audioOutput);
connect( connect(
&player_, &QMediaPlayer::mediaStatusChanged, this, [this](QMediaPlayer::MediaStatus status) { &player_, &QMediaPlayer::mediaStatusChanged, this, [this](QMediaPlayer::MediaStatus status) {
if (status == QMediaPlayer::LoadedMedia) nhlog::ui()->debug("WebRTC: ringtone status {}",
player_.play(); QMetaEnum::fromType<QMediaPlayer::MediaStatus>().valueToKey(status));
}); });
connect(&player_, connect(&player_,
@ -841,6 +844,7 @@ CallManager::retrieveTurnServer()
void void
CallManager::playRingtone(const QUrl &ringtone, bool repeat) CallManager::playRingtone(const QUrl &ringtone, bool repeat)
{ {
nhlog::ui()->debug("Trying to play ringtone {}", ringtone.toString().toStdString());
player_.setLoops(repeat ? QMediaPlayer::Infinite : 1); player_.setLoops(repeat ? QMediaPlayer::Infinite : 1);
player_.setSource(ringtone); player_.setSource(ringtone);
// player_.audioOutput()->setVolume(100); // player_.audioOutput()->setVolume(100);

Loading…
Cancel
Save