HTML5 using src using raw binary data

JavascriptWeb DevelopmentFront End Scripts

If an audio file is stored in database and then we want to use this file as a blob or binary in an application where audio source is according to session then binary data is returned through ${}. To load the audio file in an audio tag, data:audio/mp3;base64 works well.

As for the image, image tag is used as follows:

<img src="data:image/gif;base64,source “,width="30" height="25" alt="My Image">

Similarly for audio, audio tag data:audio/mp3 is used.

Published on 11-Apr-2018 13:41:50