- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
next point next problem: On Android, it works, and IOS kills my serves.
var source = cordova.file.applicationDirectory + "/www/static/" + slide.audio; var player new Media(source, function () { }, function (e) { console.log(e); if (ios.isIOS()) { alert(JSON.stringify(e)); } }, ); player.play();
I always get Code 1, cannot use resource.
I already left out cordova.file.applicationDirectory, and the "www" part.
Additionally, I used resolveLocalFileSystemURL and toInternalURL, and toUrl() without a change.
If i use this with the application directory,
var success = function (e) { console.log("LIST"); console.log(e); if (e.isDirectory) { rf(e.nativeURL()); } } var fail = function (e) { console.log("FAILURE READING"); console.log(e); } var rf = function (ds) { window.resolveLocalFileSystemURL(ds, function (dirEntry) { var directoryReader = dirEntry.createReader(); console.log(dirEntry); // Get a list of all the entries in the directory directoryReader.readEntries(success, fail); }); }
I only get 2 files, CDVNotification.bundle (file:///var/containers/Bundle/Application/0A527AB4-BEAD-478B-A367-98D541D74E12/Storyspot.app/CDVNotification.bundle/) as folder, and, Default-568h@2x~iphone.png as file.
What do I do wrong?
King regards,
Sascha
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sascha -- check out the "hello cordova" sample app. It is able to play a media file from within your application directories. Look for the "btnBarkCordova()" function inside the "app.js" file.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page