react-native-video-trim 7.1.0 → 7.1.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACX,UAAU,EACX,MAAM,mBAAmB,CAAC;AAK3B,QAAA,MAAM,SAAS,KAAiD,CAAC;AA4EjE;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,CACb,IAAI,CAAC,YAAY,EAAE,iBAAiB,GAAG,cAAc,GAAG,iBAAiB,CAAC,CAC3E,GAAG;IACF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GACA,IAAI,CAoBN;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAE7C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAE5C;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAK7D;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAEtE;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAClB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,GAC5B,OAAO,CAAC,UAAU,CAAC,CAErB;AAED,cAAc,mBAAmB,CAAC;AAClC,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACX,UAAU,EACX,MAAM,mBAAmB,CAAC;AAK3B,QAAA,MAAM,SAAS,KAAiD,CAAC;AAiFjE;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,CACb,IAAI,CACF,YAAY,EACV,iBAAiB,GACjB,cAAc,GACd,iBAAiB,GACjB,eAAe,GACf,yBAAyB,CAC5B,CACF,GAAG;IACF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,GACA,IAAI,CAgCN;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAE7C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAE5C;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAK7D;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAEtE;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAClB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,GAC5B,OAAO,CAAC,UAAU,CAAC,CAErB;AAED,cAAc,mBAAmB,CAAC;AAClC,eAAe,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-video-trim",
3
- "version": "7.1.0",
3
+ "version": "7.1.1",
4
4
  "description": "Video trimmer for your React Native app",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -129,6 +129,16 @@ export interface EditorConfig extends BaseOptions {
129
129
  * `"light"` uses a white background with black icons/text and white trimmer-handle chevrons.
130
130
  */
131
131
  theme?: string;
132
+ /** Color of the audio waveform bars as a `processColor` value. */
133
+ waveformColor?: number;
134
+ /** Background color behind the audio waveform bars as a `processColor` value. */
135
+ waveformBackgroundColor?: number;
136
+ /** Width of each waveform bar in dp/pt (default: `3`). */
137
+ waveformBarWidth?: number;
138
+ /** Gap between waveform bars in dp/pt (default: `2`). */
139
+ waveformBarGap?: number;
140
+ /** Corner radius of waveform bars in dp/pt (default: `1.5`). */
141
+ waveformBarCornerRadius?: number;
132
142
  }
133
143
 
134
144
  /**
package/src/index.tsx CHANGED
@@ -73,6 +73,11 @@ function createEditorConfig(
73
73
  alertOnFailMessage:
74
74
  'Fail to load media. Possibly invalid file or no network connection',
75
75
  alertOnFailCloseText: 'Close',
76
+ waveformColor: processColor('white') as number,
77
+ waveformBackgroundColor: processColor('#3478F6') as number,
78
+ waveformBarWidth: 3,
79
+ waveformBarGap: 2,
80
+ waveformBarCornerRadius: 1.5,
76
81
  ...createBaseOptions(overrides),
77
82
  ...overrides,
78
83
  };
@@ -98,14 +103,29 @@ function createTrimOptions(overrides: Partial<TrimOptions> = {}): TrimOptions {
98
103
  export function showEditor(
99
104
  filePath: string,
100
105
  config: Partial<
101
- Omit<EditorConfig, 'headerTextColor' | 'trimmerColor' | 'handleIconColor'>
106
+ Omit<
107
+ EditorConfig,
108
+ | 'headerTextColor'
109
+ | 'trimmerColor'
110
+ | 'handleIconColor'
111
+ | 'waveformColor'
112
+ | 'waveformBackgroundColor'
113
+ >
102
114
  > & {
103
115
  headerTextColor?: string;
104
116
  trimmerColor?: string;
105
117
  handleIconColor?: string;
118
+ waveformColor?: string;
119
+ waveformBackgroundColor?: string;
106
120
  }
107
121
  ): void {
108
- const { headerTextColor, trimmerColor, handleIconColor } = config;
122
+ const {
123
+ headerTextColor,
124
+ trimmerColor,
125
+ handleIconColor,
126
+ waveformColor,
127
+ waveformBackgroundColor,
128
+ } = config;
109
129
  const isLight = config.theme === 'light';
110
130
  const _headerTextColor = processColor(
111
131
  headerTextColor || (isLight ? 'black' : 'white')
@@ -114,6 +134,10 @@ export function showEditor(
114
134
  const _handleIconColor = processColor(
115
135
  handleIconColor || (isLight ? 'white' : 'black')
116
136
  );
137
+ const _waveformColor = processColor(waveformColor || 'white');
138
+ const _waveformBackgroundColor = processColor(
139
+ waveformBackgroundColor || '#3478F6'
140
+ );
117
141
 
118
142
  VideoTrim.showEditor(
119
143
  filePath,
@@ -122,6 +146,8 @@ export function showEditor(
122
146
  headerTextColor: _headerTextColor as any,
123
147
  trimmerColor: _trimmerColor as any,
124
148
  handleIconColor: _handleIconColor as any,
149
+ waveformColor: _waveformColor as any,
150
+ waveformBackgroundColor: _waveformBackgroundColor as any,
125
151
  })
126
152
  );
127
153
  }