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 = `