mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 02:12:30 +01:00
remember certain settings across file loads #85
This commit is contained in:
parent
2ad9433d36
commit
edd80ff6cb
@ -82,7 +82,7 @@ class App extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
const defaultState = {
|
||||
const localState = {
|
||||
working: false,
|
||||
filePath: '', // Setting video src="" prevents memory leak in chromium
|
||||
html5FriendlyPath: undefined,
|
||||
@ -94,20 +94,26 @@ class App extends React.Component {
|
||||
cutEndTime: undefined,
|
||||
cutEndTimeManual: undefined,
|
||||
fileFormat: undefined,
|
||||
captureFormat: 'jpeg',
|
||||
rotation: 360,
|
||||
cutProgress: undefined,
|
||||
includeAllStreams: false,
|
||||
stripAudio: false,
|
||||
};
|
||||
|
||||
this.state = _.cloneDeep(defaultState);
|
||||
const globalState = {
|
||||
stripAudio: false,
|
||||
includeAllStreams: false,
|
||||
captureFormat: 'jpeg',
|
||||
};
|
||||
|
||||
this.state = {
|
||||
...localState,
|
||||
...globalState,
|
||||
};
|
||||
|
||||
const resetState = () => {
|
||||
const video = getVideo();
|
||||
video.currentTime = 0;
|
||||
video.playbackRate = 1;
|
||||
this.setState(defaultState);
|
||||
this.setState(localState);
|
||||
};
|
||||
|
||||
const load = (filePath, html5FriendlyPath) => {
|
||||
|
Loading…
Reference in New Issue
Block a user