linphone-desktop/ui/views/App/Settings/SettingsVideo.js
Ronan Abhamon 23939aaa2a feat(core): supports H264 download
Co-authored-by: Danmei Chen <danmei.chen@belledonne-communications.com>
2018-03-23 10:43:48 +01:00

31 lines
938 B
JavaScript

// =============================================================================
// `SettingsVideo.qml` Logic.
// =============================================================================
.import Linphone 1.0 as Linphone
.import 'qrc:/ui/scripts/LinphoneUtils/linphone-utils.js' as LinphoneUtils
// =============================================================================
function showVideoPreview (account) {
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/SettingsVideoPreview.qml'))
}
function updateVideoPreview () {
var count = Linphone.CallsListModel.rowCount()
if (count === 0) {
showCameraPreview.enabled = true
} else if (count === 1) {
showCameraPreview.enabled = false
window.detachVirtualWindow()
}
}
function hideVideoPreview () {
window.detachVirtualWindow()
}
function handleCodecDownloadRequested (codecInfo) {
LinphoneUtils.openCodecOnlineInstallerDialog(window, codecInfo)
}