Revision history [back]

click to hide/show revision 1
initial version

answered 2020-11-18 11:10:14 +0800

MDuchemin gravatar image MDuchemin

ZK Team

Hi rmalik,

The src attribute will accept a url relative to the ServletContext. (the root of your webapp) This said, you can still use a file located outside of your ServletContext by using the setContent() method on Audio, and passing the File directly:

myAudio.setContent(new AAudio(new File("D:\\test\\file.mp3")));

(test here on windows, but works the same on linux)

Hi rmalik,

The src attribute will accept a url relative to the ServletContext. (the root of your webapp) This said, you can still use a file located outside of your ServletContext by using the setContent() method on Audio, and passing the File directly:

myAudio.setContent(new AAudio(new File("D:\\test\\file.mp3")));

(test here on windows, but works the same on linux)

You can do this in a composer, or by returning the AAudio in a getter of your viewModel in MVVM

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More