HTML5 audio can not play?

in file,I use HTML5 tag to create audio.if html file include “touchui.js”,media.play() not run.if not include “touchui.js” file,media.play() can run.why?how to run media.play()?in safari error console,display error “TypeError: ‘undefined’ is not a function (evaluating ‘media.play()’)”?

Your browser does not support the audio element.


You have dhx.ui({ without “container” attribute - which means that it will init in fullscreen mode, removing all existing content of body tag, including the audio tag.

You need to place some div on the page and provide the id of that div through container attribute, in such case ui will be placed in that div, and other tag on the page will be unaffected.

I modifyed code,red color,but not play audio.why?thank you!

Your browser does not support the audio element.

Check the attached sample.
touch_media.zip (170 KB)

hi,
I downloaded the previous example, but does not work.

have some complete example?

Above sample has link to online mp3 file, which is not available anymore