From 0ccf74e24187b6884830e92b2651ef2c0e742dcf Mon Sep 17 00:00:00 2001 From: Waldyr de Souza Date: Thu, 29 Sep 2016 12:22:49 -0300 Subject: [PATCH] FS-9591 [verto_communicator] Adjust settings and fix preview bugs to improve user experience --- .../src/partials/settings.html | 54 +++++++++++-------- .../controllers/PreviewController.js | 11 +++- 2 files changed, 40 insertions(+), 25 deletions(-) diff --git a/html5/verto/verto_communicator/src/partials/settings.html b/html5/verto/verto_communicator/src/partials/settings.html index 92e7cfc1f7..8678bfb751 100644 --- a/html5/verto/verto_communicator/src/partials/settings.html +++ b/html5/verto/verto_communicator/src/partials/settings.html @@ -2,14 +2,7 @@
-
- - -
- -
+
-
- - -
- {{ 'PREVIEW_SETTINGS' | translate }} {{ 'REFRESH_DEVICE_LIST' | translate }} + {{ 'FACTORY_RESET_SETTINGS' | translate }}
@@ -128,6 +115,20 @@

{{ 'REMOTE_ENCODER' | translate }}

+
+ + +
+ +
+ + +
+
-
- -
+
+
+ +
- {{ 'CHECK_NETWORK_SPEED' | translate }} + + {{ 'CHECK_NETWORK_SPEED' | translate }} + + +
+ +
+
@@ -168,7 +177,6 @@ ng-options="item.id as item.label for item in verto.bandwidth">
-
diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/PreviewController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/PreviewController.js index 1379409cfe..9f437909c8 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/PreviewController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/PreviewController.js @@ -24,9 +24,16 @@ } }; - if (storage.data.selectedVideo !== 'none') { + var newDevice = verto.data.videoDevices.find(function(device) { + return device.id == storage.data.selectedVideo; + }); + + storage.data.selectedVideo = newDevice.id; + storage.data.selectedVideoName = newDevice.label; + + if (newDevice.id !== 'none') { constraints.video = { - optional: [{ sourceId: storage.data.selectedVideo }] + optional: [{ sourceId: newDevice.id }] }; }