- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Hi everyone. I want to ask how to play media *.mp3 offline in Intel XDK?
My code:
var src = "sounds/music.mp3"; var my_media = new Media(src, // success callback function () { alert("playAudio():Audio Success"); }, // error callback function (err) { alert("playAudio():Audio Error: " + err.code); }); my_media.play({playAudioWhenScreenIsLocked : true });
And i already put the mp3 file to www path.
And when i run project, i got error number "1". But when i change source file to streaming radio, its working, but for the offline music its not working. Im using Media plugins version 2.4.0 and Cordova CLI version 5.4.1.
Thank for your help. :)
- Теги:
- HTML5
- Intel® XDK
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Check the "hello cordova" sample app to see how it plays back a local media file. Locating the media file will vary depending on the platform. And don't use alerts to debug your apps, they tend to interfere with your program logic, use console.log messages, instead, they are much less intrusive on the runtime thread of execution.
Ссылка скопирована
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Check the "hello cordova" sample app to see how it plays back a local media file. Locating the media file will vary depending on the platform. And don't use alerts to debug your apps, they tend to interfere with your program logic, use console.log messages, instead, they are much less intrusive on the runtime thread of execution.
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Paul F. (Intel) wrote:
Check the "hello cordova" sample app to see how it plays back a local media file. Locating the media file will vary depending on the platform. And don't use alerts to debug your apps, they tend to interfere with your program logic, use console.log messages, instead, they are much less intrusive on the runtime thread of execution.
Thank you Paul :)

- Подписка на RSS-канал
- Отметить тему как новую
- Отметить тему как прочитанную
- Выполнить отслеживание данной Тема для текущего пользователя
- Закладка
- Подписаться
- Страница в формате печати