Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3407201
D7477.id25235.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7477.id25235.diff
View Options
diff --git a/native/input/input-state-container.react.js b/native/input/input-state-container.react.js
--- a/native/input/input-state-container.react.js
+++ b/native/input/input-state-container.react.js
@@ -721,13 +721,18 @@
userTime = Date.now() - start;
};
+ const onTranscodingProgress = (percent: number) => {
+ this.setProgress(localMessageID, localMediaID, 'transcoding', percent);
+ };
+
let processedMedia;
const processingStart = Date.now();
try {
- const processMediaReturn = processMedia(
- selection,
- this.mediaProcessConfig(localMessageID, localMediaID),
- );
+ const processMediaReturn = processMedia(selection, {
+ hasWiFi: this.props.hasWiFi,
+ finalFileHeaderCheck: this.props.staffCanSee,
+ onTranscodingProgress,
+ });
reportPromise = processMediaReturn.reportPromise;
const processResult = await processMediaReturn.resultPromise;
if (!processResult.success) {
@@ -1006,21 +1011,6 @@
return await onUploadFinished(mediaMissionResult);
}
- mediaProcessConfig(localMessageID: string, localID: string) {
- const { hasWiFi, staffCanSee } = this.props;
- const onTranscodingProgress = (percent: number) => {
- this.setProgress(localMessageID, localID, 'transcoding', percent);
- };
- if (staffCanSee) {
- return {
- hasWiFi,
- finalFileHeaderCheck: true,
- onTranscodingProgress,
- };
- }
- return { hasWiFi, onTranscodingProgress };
- }
-
setProgress(
localMessageID: string,
localUploadID: string,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 5, 4:39 AM (14 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2614466
Default Alt Text
D7477.id25235.diff (1 KB)
Attached To
Mode
D7477: [native] Get rid of `mediaProcessConfig` and pass `processMedia` config directly
Attached
Detach File
Event Timeline
Log In to Comment