I am sending videos from my Smooch account to users. This is the relevant part of the code I'm using for testing:
var stream = fs.createReadStream('./video.mp4')
smooch.attachments.create({
appId: appId,
props: {
for: 'message',
access: 'public',
appUserId: appUserId
},
source: stream
})
.then((response) => {
smooch.appUsers.sendMessage({
appId: appId,
userId: appUserId,
message:{
role: 'appMaker',
type: 'image',
mediaUrl: response.mediaUrl
}
})
})
When the user receives the file, they get a download link to get the file. However, for other file formats, such as pdf, Whatsapp shows a preview.
Is it possible to get Whatsapp to show the video preview and watch the video directly from the app? I have tried different video formats but the result is always the same.
Thank you!