2
    var blob = new Blob([uint8Array], { type: "video/mp4" });
    var $outputVideo = new File([blob], "video.mp4", { type: "video/mp4" });
    
    $(".btn-save-video").click(function(e){
       if (navigator.canShare && navigator.canShare({ files: [$outputVideo] })) {
    
         e.preventDefault();
          
         navigator.share({
            files: [$outputVideo]
         })
         .then(() => console.log('Share was successful.'))
         .catch((error) => console.log('Sharing failed', error));
    
    
      }
   })

The above code works in android devices. However, when I try to share to whatsapp in iphone (ios 15 which supports the share api), it can read the video and show it in whatsapp however fail to deliver, it shows "Couldn't send message. Try again or open Whatsapp to resend".

HUNG
  • 525
  • 7
  • 17

0 Answers0