From a447b0ecfc56d8e264fc23babaa14627b9f1b967 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Wed, 18 Oct 2017 21:11:26 -0500 Subject: [PATCH] fix list of recordable things --- .../PopupRecordingStartStop.js.jsx.coffee | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) 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 9b1623a91..240152f4c 100644 --- a/web/app/assets/javascripts/react-components/PopupRecordingStartStop.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/PopupRecordingStartStop.js.jsx.coffee @@ -7,6 +7,16 @@ ScreenRecordActive = 2 WebCam2RecordActive = 3 DesktopRecordActive = 4 +recording_sources = [WebCamRecordActive, WebCam2RecordActive, ScreenRecordActive, DesktopRecordActive] + +recording_data = { + 2: {key: 'video-window', text: 'Record session video window'}, + 1: {key: 'webcam-only', text: 'Record my webcam only'}, + 3: {key: 'webcam-only-2', text: 'Record my 2nd webcam only'}, + 4: {key: 'desktop-only', text: 'Record my computer desktop'} +} + + mixins = [] # make sure this is actually us opening the window, not someone else (by checking for MixerStore) @@ -102,7 +112,7 @@ if accessOpener this.setState(showNote: !this.state.showNote) getInitialState: () -> - {isRecording: window.ParentIsRecording, showNote: true, recordedOnce: false, chatMixer: MixerStore.mixers?.chatMixer} + {isRecording: window.ParentIsRecording, showNote: true, recordedOnce: false, chatMixer: MixerStore.mixers?.chatMixer, openWindows: []} render: () -> @@ -126,6 +136,15 @@ if accessOpener chatHelp = `[?]` + options = [] + for source in recording_sources + if this.state.openWindows? + found = this.state.openWindows.indexOf(source) > -1 + + if found + data = recording_data[source] + options.push(``) + recordingJSX = `
@@ -142,10 +161,7 @@ if accessOpener
@@ -235,8 +251,15 @@ if accessOpener $includeChat = $root.find('#include-chat') context.JK.checkbox($includeChat) + openWindows = window.opener.jamClient.getOpenVideoSources() + fixedwindows = [] + if openWindows? + for key, value of openWindows + fixedwindows.push(value) + + this.setState({openWindows: fixedwindows}) @resizeWindow() # this is necessary due to whatever the client's rendering behavior is.