The big problem that you are facing is that YouTube does not accept mp3 files directly, the video must be created from an mp3 file.
Dynamically creating video in a browser without any support on the server side would be almost impossible, just access the data in mp3 (or any image source for the video stream), and writing a codec in JavaScript would not be fun.
Perhaps you could do it on the server side in a streaming way if you can find / write software that can appropriately trim mp3 audio and just put a flat image into a simple video stream on each key frame, multiplexing when you go.
If you can do all of this, the download API details describe the process in detail. You can do this without any metadata at all , simplifying the process for streaming.
, , - . AJAX , URL- , .