Play Audio Files MP3

QuestionsPlay Audio Files MP3
George Adam asked 7 years ago

Dear Sirs,

Is there any way to play Mp3 audio using onlick function. I have a grid table linked with Mysql. Every row has a unique mp3 file. The files are located into Directory (Sounds) and its name is saved on mysql.

Hope that you have a solution.

Thank you in advance and best regards.

4 Answers
Abu Ghufran answered 7 years ago

You can use <audio> tag of html as column value and have mp3 file name field as placeholder. e.g.
e.g.
$col["default"] = "<audio width='20' src='{mp3_field}'></audio>

This is currently supported in full version.

George answered 7 years ago

Dear Abu Ghufran,

Thank you for your reply. I have tried this but not working. I highly appreciate if you could give an example.

$col = array();
$col["title"] = "Sound"; // caption of column, can use HTML tags too
$col["name"] = "Sound"; // grid column name, same as db field or alias from sql
$col["width"] = "40"; // width on grid
$col["align"] = "center";
$col["fixed"] = true;
$col["default"] = "<audio width='20' src='../$soundsDir{Sound}'></audio>";
$cols[] = $col;

Best regards,

Abu Ghufran answered 7 years ago

If using paid version, please email me order number / payment email address and code for review.
Email me at [email protected]

George answered 7 years ago

Dear Abu Ghufran,

Please disregard my previous reply. Its working now.

Best regards.

Your Answer

12 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?