I am converting the audio MP3 file and storing it as base64 in database using WEB API, now I am fetching the base64 file using ajax and I am getting the base64, the problem is how can I convert the base64 file back to mp3 file and play it using JavaScript. This if for demo I am using input file,
Tag: cordova
Cordova SQLite save BLOB
I have a problem with Cordova SQLite plugin. How can I save BLOB image to SQLite? I have BLOB object in JS: And I trying to save it And when i trying to get this image: I get this string: How can i convert it to BLOB again? Also i trying to save images in base64, but i can’t save
Converting base64 to blob in javascript
I tried to convert a JPEG’s base64 string to a blob on a Cordova/hybrid app running on iOS 8 using the following function b64toBlob. However it’s giving an error when we do How can be work around this error? Answer Try this out. Please note that dataURI is assumed to include base64 prefix. (e.g. “data:image/jpeg;base64,”) Usage:
Swipe gesture in phonegap android
How swipe guesture to be implemented in phonegap android? Answer If you’re using jQuery mobile you can use the built in event swipe. Documentation E.g.: If you’re using jQuery UI take a look at jQuery UI Touch Punch. jQuery UI Touch Punch is a small hack that enables the use of touch events on sites using the jQuery UI user
javascript canvas doesn’t draw images
I’m developing hybrid javascript app for android using cordova. In the following code I use two ways of drawing image on canvas: with setTimeout and without. Following code (wrapped with cordova) on android device doesn’t react on func1 but does react on func2. The second click on func1 finally draws image on a canvas. Which is completely strange. I assume
“Cannot read property ‘content’ of null”: Psuedo Elements
I adapted some code from here in order to detect orientation changes in my Phonegap app (to load different CSS files for landscape and portrait). I’m getting a “cannot read property ‘content’ of null error, implying there’s something wrong with the DOM call. The code involves adding these psuedo elements to the primary CSS file: And this event listener to