ru-howe • Community Beginner, May 27, 2024May 27, 2024
Hi,
In case it's helpful, our use is slightly different in that we restrict to MP4 if the user is creating a video, and to PNG or JPG if the user is creating an image.
But it works fine with very similar params to yours. Although we pass the values in as a variable that is set by another method, the content and format is the same.
>From looking at yours, the only thing is that I might try is removing the trailing comma, and try putting the image setting before the video.
ccEverywhere.createDesign({
callbacks: {
...createDesignCallback,
onPublish: (publishParams: any) => {
createDesignCallback.onPublish(publishParams, mediaName);
},
},
modalParams: {
canvasSize: 'Video',
parentElementId: 'parentElementId',
},
inputParams: {
editorPanelView: 'media',
canvasSize: 'Video',
asset: {
// for now AE type: video is not working for some reason. Using image type worked for both image and video
type: 'image',
dataType: 'url',
data: dataUrl,
},
},
outputParams: {
outputType: 'url',
allowedFileTypes: ['video/mp4', 'image/png'],
},
});
In case it's helpful, our use is slightly different in that we restrict to MP4 if the user is creating a video, and to PNG or JPG if the user is creating an image.
But it works fine with very similar params to yours. Although we pass the values in as a variable that is set by another method, the content and format is the same.
>From looking at yours, the only thing is that I might try is removing the trailing comma, and try putting the image setting before the video.
Also maybe try testing with just png image and just video, and see if it works to restrict them.
Ru
________________________
Ru Howe | Chief Design and Technology Officer Stornaway Adaptive Interactive Video
What is Stornaway? Watch our 3 minute Demo Video at www.stornaway.io and sign up for free.
Just want to make a note so people who have the same issue will know: The allowFileTypes should always be compatible with the input asset type. For example, 1. if allowFileTypes=['video/mp4','image/png','image/jpeg'] and asset,].type='image'; AE editor will show a select with 3 options: ["empty-option", "PNG", "JPEC"]. 2. if allowFileTypes=['image/png','image/jpeg'] and asset,].type='image'; AE editor will show a select with 3 options: ["PNG", "JPEC"], with "PNG" as the default option.