mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-06 16:45:26 +02:00
AvAdapter: allow audio-only sharing
Change-Id: I88e1fcc9726253366224aae81aabf5797f582939
This commit is contained in:
parent
ddb1409195
commit
03c20a4205
1 changed files with 4 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue