@capillarytech/creatives-library 7.14.21 → 7.14.23
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/package.json
CHANGED
|
@@ -178,6 +178,7 @@ function CapVideoUpload(props) {
|
|
|
178
178
|
<CapUploader.CapDragger
|
|
179
179
|
customRequest={(data) => capUploaderCustomVideoRequest(data)}
|
|
180
180
|
className="form-builder-dragger whatsapp-background"
|
|
181
|
+
showUploadList={!isVideoError}
|
|
181
182
|
>
|
|
182
183
|
<CapHeading className="dragger-title" type="h7">
|
|
183
184
|
<FormattedMessage {...messages.dragAndDrop} />
|
|
@@ -61,6 +61,6 @@ export default defineMessages({
|
|
|
61
61
|
},
|
|
62
62
|
whatsappFileFormat: {
|
|
63
63
|
id: `${scope}.whatsappFileFormat`,
|
|
64
|
-
defaultMessage: 'Format: MP4
|
|
64
|
+
defaultMessage: 'Format: MP4 (H.264 video codec and AAC audio codec)',
|
|
65
65
|
},
|
|
66
66
|
});
|
|
@@ -12,7 +12,7 @@ const readFileData = (file) => new Promise((resolve, reject) => {
|
|
|
12
12
|
//function to convert first page of pdf to image for the thumbnail preview
|
|
13
13
|
export const convertPdfToImages = async (file) => {
|
|
14
14
|
const data = await readFileData(file);
|
|
15
|
-
const encoderQuality = 1
|
|
15
|
+
const encoderQuality = 0.1;
|
|
16
16
|
return PDFJS.getDocument(data)
|
|
17
17
|
.then(async function (pdf) {
|
|
18
18
|
const numberOfPages = pdf.numPages;
|
|
@@ -179,7 +179,7 @@ export const INITIAL_CTA_DATA = [
|
|
|
179
179
|
];
|
|
180
180
|
|
|
181
181
|
export const ALLOWED_IMAGE_EXTENSIONS_REGEX = /\.(jpe?g|png)$/i;
|
|
182
|
-
export const ALLOWED_EXTENSIONS_VIDEO_REGEX = (/\.(mp4
|
|
182
|
+
export const ALLOWED_EXTENSIONS_VIDEO_REGEX = (/\.(mp4)$/i);
|
|
183
183
|
export const ALLOWED_EXTENSIONS_DOCUMENT_REGEX = (/\.(pdf)$/i);
|
|
184
184
|
export const WHATSAPP_IMG_SIZE = 5000000; // 5MB
|
|
185
185
|
export const WHATSAPP_VIDEO_SIZE = 16000000; // 16MB
|