From ce02ba86646a7e5bd5030fddebb9f222a2f37d64 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Fri, 12 May 2017 08:03:59 -0500 Subject: [PATCH] fix vide orecording options --- .../PopupRecordingStartStop.js.jsx.coffee | 13 +++++++++++++ .../react-components/stores/VideoStore.js.coffee | 1 + web/app/views/clients/_help.html.slim | 12 ++++++++++++ 3 files changed, 26 insertions(+) diff --git a/web/app/assets/javascripts/react-components/PopupRecordingStartStop.js.jsx.coffee b/web/app/assets/javascripts/react-components/PopupRecordingStartStop.js.jsx.coffee index 354f80cdc..9b1623a91 100644 --- a/web/app/assets/javascripts/react-components/PopupRecordingStartStop.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/PopupRecordingStartStop.js.jsx.coffee @@ -78,6 +78,19 @@ if accessOpener logger.debug("prevent video from opening", VideoStore) context.JK.prodBubble($root.find('.control'), 'video-window-not-open', {}, {positions:['bottom']}) return + + if recordVideo == WebCamRecordActive && !VideoStore.openVideoSources.webcam1 + context.JK.prodBubble($root.find('.control'), 'no-webcam-1', {}, {positions:['bottom']}) + return + + if recordVideo == WebCam2RecordActive && !VideoStore.openVideoSources.webcam2 + context.JK.prodBubble($root.find('.control'), 'no-webcam-2', {}, {positions:['bottom']}) + return + + if recordVideo == DesktopRecordActive && !VideoStore.openVideoSources.screen_capture + context.JK.prodBubble($root.find('.control'), 'no-screen-capture', {}, {positions:['bottom']}) + return + logger.debug("@inputType, @udiotye", recordChat, recordVideo) window.opener.RecordingActions.startRecording(recordVideo, recordChat) diff --git a/web/app/assets/javascripts/react-components/stores/VideoStore.js.coffee b/web/app/assets/javascripts/react-components/stores/VideoStore.js.coffee index d699ccfd0..d0923cda7 100644 --- a/web/app/assets/javascripts/react-components/stores/VideoStore.js.coffee +++ b/web/app/assets/javascripts/react-components/stores/VideoStore.js.coffee @@ -148,6 +148,7 @@ BackendToFrontendFPS = { # ex: with mac webcam open only: session_window: 2, webcam1: 1} # no webcam open: Object {} + @openVideoSources = openVideoSources @anyVideoOpen = Object.keys(openVideoSources).length > 0 @state.anyVideoOpen = Object.keys(openVideoSources).length > 0 this.trigger(@state) diff --git a/web/app/views/clients/_help.html.slim b/web/app/views/clients/_help.html.slim index c80c8f165..1f9e20dde 100644 --- a/web/app/views/clients/_help.html.slim +++ b/web/app/views/clients/_help.html.slim @@ -371,6 +371,18 @@ script type="text/template" id="template-help-video-window-not-open" p You've selected to record video, but the video window is not open. p Click the VIDEO button in the main window and try again. +script type="text/template" id="template-help-no-webcam-1" + .video-window-not-open + p You've selected to record your primary webcam, but it is not open. + +script type="text/template" id="template-help-no-webcam-2" + .video-window-not-open + p You've selected to record your secondary webcam, but it is not open. + +script type="text/template" id="template-help-no-screen-capture" + .video-window-not-open + p You've selected to record your desktop, but that feature is not enabled. + script type="text/template" id="template-help-vid-record-chat-input" .vid-record-chat-input p Any chat inputs in the session will also be included in the video if checked.