I am developing a Cordova based application.I have a "Notification.wav" audio file in the resources . I want to play this file using javascript when my downloadSucess method is called.
//init your audio
var audioDownloadComplete = new Audio('assets/Notification.wav');
//play it on complete
var onDownloadComplete = function(){
audioDownloadComplete.play();
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.