iidrak-analytics-react 1.2.7 → 1.2.8

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/README.md CHANGED
@@ -68,7 +68,7 @@ const iidrakConfig = {
68
68
  loggingLevel: 'INFO', // 'INFO', 'WARN', 'ERROR'
69
69
  silentMode: false, // If true, disables all logging
70
70
  sessionLength: 1800, // Session timeout in seconds (e.g. 30 mins)
71
- quality: 0.5, // Recording quality (0.1 - 1.0)
71
+ quality: 0.1, // Recording quality (0.1 - 1.0)
72
72
  fps: 2, // Frames Per Second for recording
73
73
  },
74
74
 
@@ -27,7 +27,7 @@ class MetaStreamProvider extends Component {
27
27
  const { children, style } = this.props;
28
28
 
29
29
  return (
30
- <ViewShot ref={this.viewShotRef} style={{ flex: 1 }} options={{ format: "jpg", quality: 0.5 }}>
30
+ <ViewShot ref={this.viewShotRef} style={{ flex: 1 }} options={{ format: "jpg", quality: 0.3 }}>
31
31
  <View
32
32
  style={[styles.container, style]}
33
33
  onTouchStart={(e) => this.handleTouch(e, 'touch_start')}
@@ -22,7 +22,7 @@ class MetaStreamIORecorder {
22
22
  this.endpoint = config.recordingEndpoint || (this.network.endpoints.length > 0 ? this.network.endpoints[0].replace(/:[0-9]+/, "") + ":8000" : null);
23
23
 
24
24
  // Use lower quality by default to save bandwidth
25
- this.quality = config.quality || 0.5;
25
+ this.quality = config.quality || 0.3;
26
26
  this.fps = config.fps || 2; // Frames per second (0.5s interval)
27
27
  // If user_id is provided in user config, use it as app_id (per user requirement)
28
28
  // Otherwise fallback to app_id in general config or "default"
@@ -102,9 +102,9 @@ class MetaStreamIORecorder {
102
102
  // Resize to width 400px (height maintained automatically) to reduce size
103
103
  // Use PNG to ensure deterministic output for diffing
104
104
  const base64 = await captureRef(viewRef, {
105
- format: "png",
105
+ format: "jpg",
106
106
  quality: this.quality,
107
- width: 400,
107
+ width: 350,
108
108
  result: "base64"
109
109
  });
110
110
 
@@ -154,9 +154,9 @@ class MetaStreamIORecorder {
154
154
  formData.append('is_duplicate', 'true');
155
155
  } else {
156
156
  formData.append('file', {
157
- uri: 'data:image/png;base64,' + data,
158
- type: 'image/png',
159
- name: 'screenshot.png',
157
+ uri: 'data:image/jpeg;base64,' + data,
158
+ type: 'image/jpeg',
159
+ name: 'screenshot.jpg',
160
160
  });
161
161
  }
162
162
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iidrak-analytics-react",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "react native client for metastreamio",
5
5
  "peerDependencies": {
6
6
  "@react-native-async-storage/async-storage": ">=2.2.0",