diff --git a/assets/images/camera.svg b/assets/images/camera.svg
new file mode 100644
index 000000000..d243e5f10
--- /dev/null
+++ b/assets/images/camera.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/micro.svg b/assets/images/micro.svg
new file mode 100644
index 000000000..399705539
--- /dev/null
+++ b/assets/images/micro.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/speaker.svg b/assets/images/speaker.svg
new file mode 100644
index 000000000..b984fef89
--- /dev/null
+++ b/assets/images/speaker.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/languages/en.ts b/assets/languages/en.ts
index a3656b12f..611dd1558 100644
--- a/assets/languages/en.ts
+++ b/assets/languages/en.ts
@@ -961,6 +961,13 @@ your friend's SIP address or username.
Play me!
+
+ MultimediaParameters
+
+ ok
+ OK
+
+
Notifier
diff --git a/assets/languages/fr.ts b/assets/languages/fr.ts
index ef96ba153..aecb03bf3 100644
--- a/assets/languages/fr.ts
+++ b/assets/languages/fr.ts
@@ -959,6 +959,13 @@ Cliquez ici : <a href="%1">%1</a>
Joue-moi !
+
+ MultimediaParameters
+
+ ok
+ OK
+
+
Notifier
diff --git a/resources.qrc b/resources.qrc
index 71b0bd9c4..5172f17bd 100644
--- a/resources.qrc
+++ b/resources.qrc
@@ -52,6 +52,7 @@
assets/images/camera_on_normal.svg
assets/images/camera_on_pressed.svg
assets/images/camera_on_updating.svg
+ assets/images/camera.svg
assets/images/cancel_hovered.svg
assets/images/cancel_normal.svg
assets/images/cancel_pressed.svg
@@ -132,6 +133,7 @@
assets/images/micro_on_hovered.svg
assets/images/micro_on_normal.svg
assets/images/micro_on_pressed.svg
+ assets/images/micro.svg
assets/images/missed_incoming_call.svg
assets/images/missed_outgoing_call.svg
assets/images/new_call_hovered.svg
@@ -178,6 +180,7 @@
assets/images/speaker_on_hovered.svg
assets/images/speaker_on_normal.svg
assets/images/speaker_on_pressed.svg
+ assets/images/speaker.svg
assets/images/splash_screen.svg
assets/images/tel_keypad_hovered.svg
assets/images/tel_keypad_normal.svg
@@ -380,6 +383,7 @@
ui/views/App/Calls/Dialogs/CallSipAddress.qml
ui/views/App/Calls/Dialogs/CallTransfer.qml
ui/views/App/Calls/Dialogs/ConferenceManager.qml
+ ui/views/App/Calls/Dialogs/MultimediaParameters.qml
ui/views/App/Calls/EndedCall.qml
ui/views/App/Calls/IncallAvatar.qml
ui/views/App/Calls/IncallFullscreenWindow.qml
@@ -437,6 +441,7 @@
ui/views/App/Styles/Calls/Dialogs/CallSipAddressStyle.qml
ui/views/App/Styles/Calls/Dialogs/CallTransferStyle.qml
ui/views/App/Styles/Calls/Dialogs/ConferenceManagerStyle.qml
+ ui/views/App/Styles/Calls/Dialogs/MultimediaParametersStyle.qml
ui/views/App/Styles/Main/Assistant/ActivateLinphoneSipAccountWithEmailStyle.qml
ui/views/App/Styles/Main/Assistant/ActivateLinphoneSipAccountWithPhoneNumberStyle.qml
ui/views/App/Styles/Main/Assistant/AssistantAbstractViewStyle.qml
diff --git a/ui/views/App/Calls/Dialogs/MultimediaParameters.qml b/ui/views/App/Calls/Dialogs/MultimediaParameters.qml
new file mode 100644
index 000000000..53e97ccd9
--- /dev/null
+++ b/ui/views/App/Calls/Dialogs/MultimediaParameters.qml
@@ -0,0 +1,95 @@
+import QtQuick 2.7
+import QtQuick.Layouts 1.3
+
+import Common 1.0
+import Linphone 1.0
+import Utils 1.0
+
+import App.Styles 1.0
+
+// =============================================================================
+
+DialogPlus {
+ buttons: [
+ TextButtonB {
+ text: qsTr('ok')
+
+ onClicked: exit(0)
+ }
+ ]
+
+ centeredButtons: true
+
+ height: MultimediaParametersStyle.height
+ width: MultimediaParametersStyle.width
+
+ // ---------------------------------------------------------------------------
+
+ Column {
+ anchors.fill: parent
+ spacing: MultimediaParametersStyle.column.spacing
+
+ RowLayout {
+ spacing: MultimediaParametersStyle.column.entry.spacing
+ width: parent.width
+
+ Icon {
+ icon: 'speaker'
+ iconSize: MultimediaParametersStyle.column.entry.iconSize
+ }
+
+ ComboBox {
+ Layout.fillWidth: true
+
+ currentIndex: Utils.findIndex(model, function (device) {
+ return device === SettingsModel.playbackDevice
+ })
+ model: SettingsModel.playbackDevices
+
+ onActivated: SettingsModel.playbackDevice = model[index]
+ }
+ }
+
+ RowLayout {
+ spacing: MultimediaParametersStyle.column.entry.spacing
+ width: parent.width
+
+ Icon {
+ icon: 'micro'
+ iconSize: MultimediaParametersStyle.column.entry.iconSize
+ }
+
+ ComboBox {
+ Layout.fillWidth: true
+
+ currentIndex: Utils.findIndex(model, function (device) {
+ return device === SettingsModel.captureDevice
+ })
+ model: SettingsModel.captureDevices
+
+ onActivated: SettingsModel.captureDevice = model[index]
+ }
+ }
+
+ RowLayout {
+ spacing: MultimediaParametersStyle.column.entry.spacing
+ width: parent.width
+
+ Icon {
+ icon: 'camera'
+ iconSize: MultimediaParametersStyle.column.entry.iconSize
+ }
+
+ ComboBox {
+ Layout.fillWidth: true
+
+ currentIndex: Number(Utils.findIndex(model, function (device) {
+ return device === SettingsModel.videoDevice
+ }))
+ model: SettingsModel.videoDevices
+
+ onActivated: SettingsModel.videoDevice = model[index]
+ }
+ }
+ }
+}
diff --git a/ui/views/App/Calls/Incall.js b/ui/views/App/Calls/Incall.js
index c5b68d240..7b1d60227 100644
--- a/ui/views/App/Calls/Incall.js
+++ b/ui/views/App/Calls/Incall.js
@@ -52,6 +52,11 @@ function handleStatusChanged (status) {
}
function handleVideoRequested () {
+ if (window.virtualWindowVisible) {
+ call.rejectVideoRequest()
+ return
+ }
+
var call = incall.call
// Close dialog after 10s.
@@ -100,6 +105,10 @@ function openCallStatistics () {
callStatistics.open()
}
+function openMediaParameters () {
+ window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/MultimediaParameters.qml'))
+}
+
function showFullscreen () {
if (incall._fullscreen) {
return
diff --git a/ui/views/App/Calls/Incall.qml b/ui/views/App/Calls/Incall.qml
index 21cf93395..63186133e 100644
--- a/ui/views/App/Calls/Incall.qml
+++ b/ui/views/App/Calls/Incall.qml
@@ -354,9 +354,10 @@ Rectangle {
Layout.preferredHeight: CallStyle.actionArea.iconSize
Layout.preferredWidth: CallStyle.actionArea.iconSize
- icon: 'options' // TODO: display options.
+ icon: 'options'
iconSize: CallStyle.actionArea.iconSize
- visible: false // TODO: V2
+
+ onClicked: Logic.openMediaParameters()
}
}
diff --git a/ui/views/App/Calls/IncallFullscreenWindow.qml b/ui/views/App/Calls/IncallFullscreenWindow.qml
index 4486953f4..2f110eb93 100644
--- a/ui/views/App/Calls/IncallFullscreenWindow.qml
+++ b/ui/views/App/Calls/IncallFullscreenWindow.qml
@@ -9,10 +9,12 @@ import Utils 1.0
import App.Styles 1.0
+import 'Incall.js' as Logic
+
// =============================================================================
Window {
- id: incall
+ id: window
// ---------------------------------------------------------------------------
@@ -24,16 +26,16 @@ Window {
function exit (cb) {
// `exit` is called by `Incall.qml`.
- // The `incall` id can be null if the window was closed in this view.
- if (!incall) {
+ // The `window` id can be null if the window was closed in this view.
+ if (!window) {
return
}
// It's necessary to call `showNormal` before close on MacOs
// because the dock will be hidden forever!
- incall.visible = false
- incall.showNormal()
- incall.close()
+ window.visible = false
+ window.showNormal()
+ window.close()
if (cb) {
cb()
@@ -43,15 +45,15 @@ Window {
// ---------------------------------------------------------------------------
Component.onCompleted: {
- incall.call = caller.call
+ window.call = caller.call
var show = function (visibility) {
if (visibility === Window.Windowed) {
- incall.visibilityChanged.disconnect(show)
- incall.showFullScreen()
+ window.visibilityChanged.disconnect(show)
+ window.showFullScreen()
}
}
- incall.visibilityChanged.connect(show)
+ window.visibilityChanged.connect(show)
}
visible: false
@@ -60,7 +62,7 @@ Window {
Shortcut {
sequence: StandardKey.Close
- onActivated: incall.exit()
+ onActivated: window.exit()
}
// ---------------------------------------------------------------------------
@@ -70,13 +72,13 @@ Window {
color: '#000000' // Not a style.
focus: true
- Keys.onEscapePressed: incall.exit()
+ Keys.onEscapePressed: window.exit()
Loader {
anchors.fill: parent
active: {
- var caller = incall.caller
+ var caller = window.caller
return caller && !caller.cameraActivated
}
@@ -86,7 +88,7 @@ Window {
id: camera
Camera {
- call: incall.call
+ call: window.call
}
}
}
@@ -191,7 +193,7 @@ Window {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
- visible: !incall.hideButtons
+ visible: !window.hideButtons
// Not a customizable style.
color: 'white'
@@ -200,7 +202,7 @@ Window {
Component.onCompleted: {
var updateDuration = function () {
- var call = incall.caller.call
+ var call = window.caller.call
text = Utils.formatElapsedTime(call.duration)
Utils.setTimeout(elapsedTime, 1000, updateDuration)
}
@@ -249,7 +251,7 @@ Window {
ActionButton {
icon: 'fullscreen'
- onClicked: incall.exit()
+ onClicked: window.exit()
}
}
}
@@ -331,16 +333,17 @@ Window {
iconSize: CallStyle.actionArea.iconSize
updating: call.updating
- onClicked: incall.exit(function () { call.videoEnabled = false })
+ onClicked: window.exit(function () { call.videoEnabled = false })
}
ActionButton {
Layout.preferredHeight: CallStyle.actionArea.iconSize
Layout.preferredWidth: CallStyle.actionArea.iconSize
+
icon: 'options'
iconSize: CallStyle.actionArea.iconSize
- visible: false // TODO: V2
+ onClicked: Logic.openMediaParameters()
}
}
@@ -357,13 +360,13 @@ Window {
icon: 'pause'
updating: call.updating
- onClicked: incall.exit(function () { call.pausedByUser = enabled })
+ onClicked: window.exit(function () { call.pausedByUser = enabled })
}
ActionButton {
icon: 'hangup'
- onClicked: incall.exit(call.terminate)
+ onClicked: window.exit(call.terminate)
}
}
}
@@ -376,7 +379,7 @@ Window {
Loader {
active: {
- var caller = incall.caller
+ var caller = window.caller
return caller && !caller.cameraActivated
}
@@ -389,21 +392,21 @@ Window {
property bool scale: false
function xPosition () {
- return incall.width / 2 - width / 2
+ return window.width / 2 - width / 2
}
function yPosition () {
- return incall.height - height
+ return window.height - height
}
- call: incall.call
+ call: window.call
isPreview: true
height: CallStyle.actionArea.userVideo.height * (scale ? 2 : 1)
width: CallStyle.actionArea.userVideo.width * (scale ? 2 : 1)
DragBox {
- container: incall
+ container: window
draggable: parent
xPosition: parent.xPosition
@@ -422,7 +425,7 @@ Window {
TelKeypad {
id: telKeypad
- call: incall.call
+ call: window.call
visible: false
}
}
diff --git a/ui/views/App/Styles/Calls/Dialogs/MultimediaParametersStyle.qml b/ui/views/App/Styles/Calls/Dialogs/MultimediaParametersStyle.qml
new file mode 100644
index 000000000..4ddb7917c
--- /dev/null
+++ b/ui/views/App/Styles/Calls/Dialogs/MultimediaParametersStyle.qml
@@ -0,0 +1,18 @@
+pragma Singleton
+import QtQml 2.2
+
+// =============================================================================
+
+QtObject {
+ property int height: 262
+ property int width: 450
+
+ property QtObject column: QtObject {
+ property int spacing: 24
+
+ property QtObject entry: QtObject {
+ property int iconSize: 24
+ property int spacing: 10
+ }
+ }
+}
diff --git a/ui/views/App/Styles/qmldir b/ui/views/App/Styles/qmldir
index afba73f60..1ad06dd13 100644
--- a/ui/views/App/Styles/qmldir
+++ b/ui/views/App/Styles/qmldir
@@ -13,6 +13,7 @@ singleton ConferenceStyle 1.0 Calls/ConferenceSty
singleton CallSipAddressStyle 1.0 Calls/Dialogs/CallSipAddressStyle.qml
singleton CallTransferStyle 1.0 Calls/Dialogs/CallTransferStyle.qml
singleton ConferenceManagerStyle 1.0 Calls/Dialogs/ConferenceManagerStyle.qml
+singleton MultimediaParametersStyle 1.0 Calls/Dialogs/MultimediaParametersStyle.qml
# Main Window ------------------------------------------------------------------