The Cordova Media
plugin is not fully supported within the AppBuilder Simulator
and I believe this might be the cause behind the "Uncaught module cordova/plugin/Media not found" error you're receiving. You can find a list of all supported core, integrated and custom Apache Cordova plugins in the Simulator Known Limitations article.
However, you should be able to play a local file in an application utilizing the Cordova Media
plugin once you deploy it on an iOS device (as an actual app package and not in the AppBuilder companion app). You only need to keep in mind that when the src
of the media is a file name or simple path, iOS will search in the www
for the file and then in the application documents/tmp
directory (as explained in the Media documentation
). This means that if you add a media folder with a media file in your project, then by default they will be placed within the www
folder when the application is deployed on a device. However, please keep in mind that the AppBuilder Companion App
cannot deploy the media file in its www
folder as this folder cannot be modified after an app is deployed. This is why it instead adds the media folder and its content under the documents
folder of the application and therefore you can't test your project in the AppBuilder Companion App
when the media src
is a relative path to the media file.
I attached a sample project for your convenience. I followed the steps described in the Run App on Remote Devices
tutorial and deployed the application on an IPhone device where I was able to successfully play the media file.
As for the simulator crashing I want to thank you for this feedback. We were able to reproduce the issue and we logged it as a bug in our system. I added 500 points to your account as a small token of gratitude for your report.
Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!