react-native-iinstall 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/FeedbackModal.js +3 -6
- package/package.json +2 -2
- package/src/FeedbackModal.tsx +3 -6
package/lib/FeedbackModal.js
CHANGED
|
@@ -115,7 +115,7 @@ const FeedbackModal = ({ visible, onClose, screenshotUri, videoUri, onStartRecor
|
|
|
115
115
|
const match = /\.(\w+)$/.exec(filename || '');
|
|
116
116
|
const type = match ? `image/${match[1]}` : `image/png`;
|
|
117
117
|
formData.append('screenshot', {
|
|
118
|
-
uri:
|
|
118
|
+
uri: screenshotUri,
|
|
119
119
|
name: filename || 'screenshot.png',
|
|
120
120
|
type,
|
|
121
121
|
});
|
|
@@ -123,7 +123,7 @@ const FeedbackModal = ({ visible, onClose, screenshotUri, videoUri, onStartRecor
|
|
|
123
123
|
// 2. Audio
|
|
124
124
|
if (audioUri) {
|
|
125
125
|
formData.append('audio', {
|
|
126
|
-
uri:
|
|
126
|
+
uri: audioUri,
|
|
127
127
|
name: 'feedback.m4a',
|
|
128
128
|
type: 'audio/m4a',
|
|
129
129
|
});
|
|
@@ -131,7 +131,7 @@ const FeedbackModal = ({ visible, onClose, screenshotUri, videoUri, onStartRecor
|
|
|
131
131
|
// 3. Video
|
|
132
132
|
if (videoUri) {
|
|
133
133
|
formData.append('video', {
|
|
134
|
-
uri:
|
|
134
|
+
uri: videoUri,
|
|
135
135
|
name: 'screen_record.mp4',
|
|
136
136
|
type: 'video/mp4',
|
|
137
137
|
});
|
|
@@ -154,9 +154,6 @@ const FeedbackModal = ({ visible, onClose, screenshotUri, videoUri, onStartRecor
|
|
|
154
154
|
// 6. Send
|
|
155
155
|
const response = await fetch(`${apiEndpoint}/api/feedback`, {
|
|
156
156
|
method: 'POST',
|
|
157
|
-
headers: {
|
|
158
|
-
'Content-Type': 'multipart/form-data',
|
|
159
|
-
},
|
|
160
157
|
body: formData,
|
|
161
158
|
});
|
|
162
159
|
const result = await response.json();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-iinstall",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "IInstall SDK for React Native - Shake to Report with Audio & Video",
|
|
5
5
|
"author": "TesterFlow Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"react-native-view-shot": "^3.1.2",
|
|
35
35
|
"react-native-device-info": "^10.0.0",
|
|
36
36
|
"react-native-audio-recorder-player": "^3.6.4",
|
|
37
|
-
"react-native-record-screen": "
|
|
37
|
+
"react-native-record-screen": "^0.6.2",
|
|
38
38
|
"rxjs": "^7.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
package/src/FeedbackModal.tsx
CHANGED
|
@@ -118,7 +118,7 @@ export const FeedbackModal: React.FC<FeedbackModalProps> = ({
|
|
|
118
118
|
const type = match ? `image/${match[1]}` : `image/png`;
|
|
119
119
|
|
|
120
120
|
formData.append('screenshot', {
|
|
121
|
-
uri:
|
|
121
|
+
uri: screenshotUri,
|
|
122
122
|
name: filename || 'screenshot.png',
|
|
123
123
|
type,
|
|
124
124
|
} as any);
|
|
@@ -127,7 +127,7 @@ export const FeedbackModal: React.FC<FeedbackModalProps> = ({
|
|
|
127
127
|
// 2. Audio
|
|
128
128
|
if (audioUri) {
|
|
129
129
|
formData.append('audio', {
|
|
130
|
-
uri:
|
|
130
|
+
uri: audioUri,
|
|
131
131
|
name: 'feedback.m4a',
|
|
132
132
|
type: 'audio/m4a',
|
|
133
133
|
} as any);
|
|
@@ -136,7 +136,7 @@ export const FeedbackModal: React.FC<FeedbackModalProps> = ({
|
|
|
136
136
|
// 3. Video
|
|
137
137
|
if (videoUri) {
|
|
138
138
|
formData.append('video', {
|
|
139
|
-
uri:
|
|
139
|
+
uri: videoUri,
|
|
140
140
|
name: 'screen_record.mp4',
|
|
141
141
|
type: 'video/mp4',
|
|
142
142
|
} as any);
|
|
@@ -162,9 +162,6 @@ export const FeedbackModal: React.FC<FeedbackModalProps> = ({
|
|
|
162
162
|
// 6. Send
|
|
163
163
|
const response = await fetch(`${apiEndpoint}/api/feedback`, {
|
|
164
164
|
method: 'POST',
|
|
165
|
-
headers: {
|
|
166
|
-
'Content-Type': 'multipart/form-data',
|
|
167
|
-
},
|
|
168
165
|
body: formData,
|
|
169
166
|
});
|
|
170
167
|
|