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
Branches
Tags
No related merge requests found
...@@ -204,16 +204,10 @@ AvAdapter::shareFile(const QString& filePath) ...@@ -204,16 +204,10 @@ AvAdapter::shareFile(const QString& filePath)
&lrc::api::AVModel::fileOpened, &lrc::api::AVModel::fileOpened,
this, this,
[this, callId, filePath, resource](bool hasAudio, bool hasVideo) { [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_->avModel().setAutoRestart(resource, true);
lrcInstance_->getCurrentCallModel() lrcInstance_->getCurrentCallModel()
->addMedia(callId, filePath, lrc::api::CallModel::MediaRequestType::FILESHARING, false, hasAudio); ->addMedia(callId, filePath, lrc::api::CallModel::MediaRequestType::FILESHARING, false, hasAudio);
} else { lrcInstance_->avModel().pausePlayer(resource, false);
// Close media player because we are not going to start sharing
lrcInstance_->avModel().closeMediaPlayer(resource);
}
}); });
lrcInstance_->avModel().createMediaPlayer(resource); lrcInstance_->avModel().createMediaPlayer(resource);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment