-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dual output recording #4794
base: master
Are you sure you want to change the base?
Dual output recording #4794
Changes from all commits
3ce1a99
99b8c61
69e1f88
ad25131
69d7d42
111a195
968cb32
bcaefea
edf3ae5
84d2831
23d5307
3acaa29
4ba6f6c
8f374e6
00ea81f
ebaabed
c9cebfb
896c3bd
1cd98c5
a9bbb47
600bed3
32942f9
1e47b32
738d690
cb0ef5c
c21cb02
db9053e
ac090fb
816bb2c
8b36c78
3e1ef2f
e0a792f
19c70aa
b5a1736
777fa64
49d6dcf
d242a9a
564fde2
d43c660
a0e9f8b
075d351
be3654e
3e97c93
2fd1b8e
870e517
65f40f7
7dbb848
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
@import '../../../styles/index.less'; | ||
@import './GoLive.m.less'; | ||
|
||
.stream-options { | ||
display: flex; | ||
flex-direction: column; | ||
align-self: flex-end; | ||
width: 100%; | ||
} | ||
|
||
.settings-row { | ||
width: 100%; | ||
margin: 0px !important; | ||
padding: 15px; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
align-self: flex-end; | ||
|
||
:global(.ant-col) { | ||
padding: 0px; | ||
} | ||
} | ||
|
||
.switcher-label { | ||
flex-grow: 1; | ||
} | ||
|
||
.recording-switcher { | ||
justify-self: flex-end; | ||
color: var(--background); | ||
|
||
:global(.ant-form-item-label) { | ||
display: none; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not worth requiring a change here but just a lil useful thing-- we have a boolean property |
||
|
||
:global(.ant-form-item-control-input) { | ||
min-height: unset; | ||
} | ||
|
||
:global(.ant-switch-small) { | ||
min-width: 36px; | ||
height: 21px; | ||
line-height: 21px; | ||
} | ||
|
||
:global(.ant-switch-small .ant-switch-handle) { | ||
width: 15px; | ||
height: 15px; | ||
top: 3px; | ||
left: 3px; | ||
} | ||
|
||
:global(.ant-switch-small.ant-switch-checked .ant-switch-handle) { | ||
left: calc(100% - 15px - 3px) !important; | ||
} | ||
|
||
:global(.ant-switch-inner i) { | ||
color: var(--background); | ||
display: flex; | ||
align-self: center; | ||
padding-right: 2px; | ||
} | ||
|
||
&:global(.ant-row.ant-form-item) { | ||
margin-bottom: 0px !important; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import React from 'react'; | ||
import styles from './StreamOptions.m.less'; | ||
import { Services } from 'components-react/service-provider'; | ||
import { $t } from 'services/i18n'; | ||
import { Row, Select } from 'antd'; | ||
import { SwitchInput } from 'components-react/shared/inputs'; | ||
import { useVuex } from 'components-react/hooks'; | ||
import { ERecordingQuality } from 'obs-studio-node'; | ||
|
||
/** | ||
* Renders options for the stream | ||
* - Vertical Recording Settings | ||
**/ | ||
export default function StreamOptions() { | ||
const { DualOutputService } = Services; | ||
|
||
const { Option } = Select; | ||
|
||
const recordingQualities = [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe these should be translated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
{ | ||
quality: ERecordingQuality.HighQuality, | ||
name: $t('High, Medium File Size'), | ||
}, | ||
{ | ||
quality: ERecordingQuality.HigherQuality, | ||
name: $t('Indistinguishable, Large File Size'), | ||
}, | ||
{ | ||
quality: ERecordingQuality.Lossless, | ||
name: $t('Lossless, Tremendously Large File Size'), | ||
}, | ||
]; | ||
|
||
const v = useVuex(() => ({ | ||
recordVertical: DualOutputService.views.recordVertical, | ||
setRecordVertical: DualOutputService.actions.return.setRecordVertical, | ||
recordingQuality: DualOutputService.views.recordingQuality, | ||
setRecordingQuality: DualOutputService.actions.setDualOutputRecordingQuality, | ||
})); | ||
|
||
return ( | ||
<div className={styles.streamOptions}> | ||
<Row | ||
gutter={16} | ||
className={styles.settingsRow} | ||
style={{ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
alignItems: 'flex-start', | ||
paddingBottom: '0px', | ||
}} | ||
> | ||
<div className={styles.switcherLabel} style={{ marginBottom: '2px' }}> | ||
{$t('Recording Quality')} | ||
</div> | ||
<Select | ||
data-name="recording-quality" | ||
defaultValue={v.recordingQuality.dualOutput} | ||
style={{ flex: 1, width: '100%' }} | ||
onChange={option => v.setRecordingQuality('dual', option)} | ||
value={v.recordingQuality.dualOutput} | ||
> | ||
{recordingQualities.map(option => ( | ||
<Option key={option.quality} value={option.quality}> | ||
{option.name} | ||
</Option> | ||
))} | ||
</Select> | ||
</Row> | ||
<Row gutter={16} className={styles.settingsRow}> | ||
<div className={styles.switcherLabel}>{$t('Vertical Recording Only')}</div> | ||
<SwitchInput | ||
value={v.recordVertical} | ||
name="record-vertical" | ||
onChange={v.setRecordVertical} | ||
uncontrolled | ||
className={styles.recordingSwitcher} | ||
checkedChildren={<i className="icon-check-mark" />} | ||
/> | ||
</Row> | ||
</div> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Should
REC
be translated?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how it was originally but you bring up a good point. The limitation is that there is only room for three characters on the button. Let's bring it up to the team?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea the character limit is the issue here, as well as i'm not certain other languages have the same shorthand that we do for this term. i think looking into an icon replacement could have value here, as there is a generally accepted icon for recording