Syntax error HTML5 using src using raw binary data

HTML5 using src using raw binary data



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 ${sessionScope.user.music}. 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.

Updated on: 2020-01-30T06:52:52+05:30

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements