I would like to preview audio and video on the web page using resp. audio and video elements. I saw that the live_img_preview component put a special img element with a data-phx-hook="Phoenix.LiveImgPreview" and that LiveImgPreview does its magic using LiveUploader in JS. I have two questions:
Is it going to be included in Phoenix LiveView ?
How could I put my own elements with the right src attribute easily ? I could write a LiveAudioPreview which calls LiveUploader just like LiveImgPreview but it looks like the object is encapsulated through an IIFE, making things difficult without a lot of hacking IMHO.
Thank you for your feeback. I finally managed to get it to work. I am saving the files in the cloud. One thing that is still not working is video capture on mobile. Some how live_file_input is allowing photo capture only. Know anything about that?