@wppconnect/wa-js 2.2.1 → 2.2.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 2.2.2 (2022-05-15)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Fixed sendFileMessage for MP4 files on Chromium (fix [#384](https://github.com/wppconnect-team/wa-js/issues/384)) ([b7e6431](https://github.com/wppconnect-team/wa-js/commit/b7e6431a180f774f88f406a9600e3af7ac51e70f))
7
+
8
+
9
+
1
10
  ## 2.2.1 (2022-05-10)
2
11
 
3
12
 
@@ -0,0 +1,25 @@
1
+ /*!
2
+ * Copyright 2021 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * Get the video file duration
18
+ * @see https://gist.github.com/Elements-/cf063254730cd754599e#gistcomment-3241210
19
+ * @see https://gist.github.com/OllieJones/5ffb011fa3a11964154975582360391c
20
+ */
21
+ export declare function getVideoInfoFromBuffer(arrayBuffer: ArrayBuffer): {
22
+ duration: number;
23
+ width: number;
24
+ height: number;
25
+ };
@@ -19,6 +19,7 @@ export * from './createWid';
19
19
  export * from './downloadImage';
20
20
  export * from './errors';
21
21
  export * from './fetchDataFromPNG';
22
+ export * from './getVideoInfoFromBuffer';
22
23
  export * from './isBase64';
23
24
  export * from './types';
24
25
  export * from './wrapFunction';
@@ -0,0 +1,33 @@
1
+ /*!
2
+ * Copyright 2021 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * @whatsapp 51428
18
+ * */
19
+ export declare function generateVideoThumbsAndDuration(data: {
20
+ file: Blob;
21
+ maxDimensions: number[];
22
+ debugHint: string;
23
+ throwOnBlack: boolean;
24
+ }): Promise<{
25
+ duration: number;
26
+ thumbs: {
27
+ url: string;
28
+ width: number;
29
+ height: number;
30
+ fullWidth: number;
31
+ fullHeight: number;
32
+ }[];
33
+ }>;
@@ -19,6 +19,7 @@ export * from './createMsgProtobuf';
19
19
  export * from './fetchLinkPreview';
20
20
  export * from './findChat';
21
21
  export * from './findFirstWebLink';
22
+ export * from './generateVideoThumbsAndDuration';
22
23
  export * from './genMinimalLinkPreview';
23
24
  export * from './getOrGenerate';
24
25
  export * from './groupParticipants';