Skip to content
Snippets Groups Projects
Commit 03c20a42 authored by Adrien Béraud's avatar Adrien Béraud Committed by Sébastien Blin
Browse files

AvAdapter: allow audio-only sharing

Change-Id: I88e1fcc9726253366224aae81aabf5797f582939
parent ddb14091
No related branches found
No related tags found
No related merge requests found
......@@ -204,16 +204,10 @@ AvAdapter::shareFile(const QString& filePath)
&lrc::api::AVModel::fileOpened,
this,
[this, callId, filePath, resource](bool hasAudio, bool hasVideo) {
// TODO: allow audio only sharing
if (hasVideo) { // only start sharing if video is available
lrcInstance_->avModel().pausePlayer(resource, false);
lrcInstance_->avModel().setAutoRestart(resource, true);
lrcInstance_->getCurrentCallModel()
->addMedia(callId, filePath, lrc::api::CallModel::MediaRequestType::FILESHARING, false, hasAudio);
} else {
// Close media player because we are not going to start sharing
lrcInstance_->avModel().closeMediaPlayer(resource);
}
lrcInstance_->avModel().setAutoRestart(resource, true);
lrcInstance_->getCurrentCallModel()
->addMedia(callId, filePath, lrc::api::CallModel::MediaRequestType::FILESHARING, false, hasAudio);
lrcInstance_->avModel().pausePlayer(resource, false);
});
lrcInstance_->avModel().createMediaPlayer(resource);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment