diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp
index d31c8ef9..d4e56b4d 100644
--- a/src/UserSettingsPage.cpp
+++ b/src/UserSettingsPage.cpp
@@ -39,12 +39,12 @@
#include <QtQml>
#include "Cache.h"
+#include "CallDevices.h"
#include "Config.h"
#include "MatrixClient.h"
#include "Olm.h"
#include "UserSettingsPage.h"
#include "Utils.h"
-#include "WebRTCSession.h"
#include "ui/FlatButton.h"
#include "ui/ToggleButton.h"
@@ -1060,7 +1060,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
[this](const QString &camera) {
settings_->setCamera(camera);
std::vector<std::string> resolutions =
- WebRTCSession::instance().getResolutions(camera.toStdString());
+ CallDevices::instance().resolutions(camera.toStdString());
cameraResolutionCombo_->clear();
for (const auto &resolution : resolutions)
cameraResolutionCombo_->addItem(QString::fromStdString(resolution));
@@ -1070,9 +1070,8 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentTextChanged),
[this](const QString &resolution) {
settings_->setCameraResolution(resolution);
- std::vector<std::string> frameRates =
- WebRTCSession::instance().getFrameRates(settings_->camera().toStdString(),
- resolution.toStdString());
+ std::vector<std::string> frameRates = CallDevices::instance().frameRates(
+ settings_->camera().toStdString(), resolution.toStdString());
cameraFrameRateCombo_->clear();
for (const auto &frameRate : frameRates)
cameraFrameRateCombo_->addItem(QString::fromStdString(frameRate));
@@ -1231,9 +1230,8 @@ UserSettingsPage::showEvent(QShowEvent *)
timelineMaxWidthSpin_->setValue(settings_->timelineMaxWidth());
privacyScreenTimeout_->setValue(settings_->privacyScreenTimeout());
- WebRTCSession::instance().refreshDevices();
- auto mics =
- WebRTCSession::instance().getDeviceNames(false, settings_->microphone().toStdString());
+ CallDevices::instance().refresh();
+ auto mics = CallDevices::instance().names(false, settings_->microphone().toStdString());
microphoneCombo_->clear();
for (const auto &m : mics)
microphoneCombo_->addItem(QString::fromStdString(m));
@@ -1241,8 +1239,7 @@ UserSettingsPage::showEvent(QShowEvent *)
auto cameraResolution = settings_->cameraResolution();
auto cameraFrameRate = settings_->cameraFrameRate();
- auto cameras =
- WebRTCSession::instance().getDeviceNames(true, settings_->camera().toStdString());
+ auto cameras = CallDevices::instance().names(true, settings_->camera().toStdString());
cameraCombo_->clear();
for (const auto &c : cameras)
cameraCombo_->addItem(QString::fromStdString(c));
|