Closed DXPRO closed 12 months ago
There is a way to not give an error, send the mp4 video to your personal number without being ptv, then try to send ptv again without errors, I believe that it stores it temporarily there it ends up recognizing it as valid media.
Today I ran some tests, but with no success. Only by sending the message first as a video and then resending it as 'ptv' does it work. I need to investigate further, but I haven't given up.
Description
When trying to send a video in mp4 format using the wa-js sendfile by type ptv, in some cases it presents invalid type errors or just the message that it was not possible to send the file
Environment
WhatsApp version: 2.2337.7
WA-JS version(s):v2.26.0
Browser: Google Chrome 115.0.5790.171
OS: Edição Windows 11 Home Single Language Versão 22H2 Instalado em 25/07/2023 Compilação do SO 22621.2134 Experiência Windows Feature Experience Pack 1000.22659.1000.0
MultiDevice (BETA): no
Steps to Reproduce
1 - First step is to inject the wa-js in the browser console by shortcut Ctrl + Shift + J
2 - Second step is to take the video file and transform it into base64 with the correct datatype, I use the site below: https://base64.guru/converter/encode/video as shown in the screenshot: Screenshot
3 - In the third and final step, I paste the function with the id of a group and the base64 file into the console:
// The PTV Video (micro video) WPP.chat.sendFileMessage( '120363159509749924@g.us', 'data:application/msword;base64,', { type: 'ptv', } );
Log Output
Your Code
Additional context / Screenshot
Add any other context about the problem here. If applicable, add screenshots to help explain.