How to have in place audio player

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
swdev
User
Posts: 3

How to have in place audio player

Post by swdev »

Hello,
we have a table with a field that contains full path to wav audio file.

How can we have a sound player, similar to audio.js, for the user to play the audio file while in list or view page?

Many thanks,

John


Webmaster
User
Posts: 9425

Post by Webmaster »

You can use Custom View Tag to display the field value by HTML 5 <audio> tag, see Field Setip -> View Tag in the help file.


swdev
User
Posts: 3

Post by swdev »

I implemented like that:

<audio controls>
<source src=@(CurrentPage.MY_FIELD.CurrentValue) type="audio/wav">
Your browser does not support the audio element.
</audio>

in order for you to check if it is correct way and to serve others who will have the same need.

Many thanks.

Kind regards,
John


Webmaster
User
Posts: 9425

Post by Webmaster »

Better use double quotes src="@CurrentPage.MY_FIELD.CurrentValue" in case the current value contains space. And this also assume current value contains the path of the file.


Post Reply