HTML5 Saving Image from a Canvas in Javascript (Android) - javascript

Im trying to make a HTML5 signature capture in Javascript.
It works already but i got a problem running it on Android.
The function canvas.toDataURL(); does not work on Androids standard browser.
Does someone know an alternative for saving a Canvas to an image(png)? Or making it run on Android?

Take a look at Hans Schmucker's workaround/reimplementation:
http://forum.xda-developers.com/showthread.php?t=1251575

Related

HTML5 Recording

I'm trying to record video using html5 .getUserMedia and then play it again without upload to the server. I have tried many tutorial and I made it work in Chrome by using canvas to draw the webp image and then convert to the webm by using Whammy.js . But the problem is it did not work on Firefox that unsupported webp. I just want to make it work in Firefox.
Any idea possible to do that?
Thanks
intrestingly firefox supports direct webm recordings, have you tried RecordRTC,
you can check the demo here.

Phonegap canvas not drawing on android but works fine in browser

I've made a simple HTML5 noughts and crosses(tic tac toe) game that uses the canvas element and I am trying to use phonegap to get it working on Android. I've test it works fine on firefox, chrome and internet explorer but when I get built using phonegap the apk produced simply renders a white screen.
I've tried using the ripple emulator and it renders and behaves as expected fine. Really confused as to why its not working.
To work on pc instead of phoengap you have to change
document.addEventListener("deviceready",onDeviceReady, false);
to
document.addEventListener("DOMContentLoaded",onDeviceReady, false);
in main.js.
I am using fast-canvas as a plugin, see the config file.
Code is avaliable here as well as assets here: https://github.com/JacobRawling/XandOs
Please help I am very confused and am struggling to find any phonegap tutorials that use
canvas.
Thanks very much
Your solution is jqscribble – A touch enabled canvas drawing tool
http://plugins.jquery.com/jqscribble/

certain default tablet browsers can't pull dataURL?

I'm running code that looks for an event trigger based off of drawing on the html5 canvas. Once you stop drawing it sends the dataURL to a input field. From there I save the dataURL to a database.
This works for the following:
Andriod Pads that are running version "icecream sandwhich"
Ipad
PC
MAC
It does not work on the following tablets:
Kindle Fire
Android Pad running "honeycomb"
here is my code to put the dataURL into the input:
document.getElementById("dataURLCode").value = canvas.toDataURL();
on the ones that works, the output in the field is something along the lines of:
data:image/png;base64,iVBORw0K...
for the ones that do not work the output code is just this:
data:,
Things I've tried to clear the cache and history. I'm trying to stray away from using a different browser other than the default one due to we are making this product for cross platform and we need to have it working for all tablets and their default browsers.
I've also pulled a dataURL into the input field no problem by copy/paste, it just cant pull using the canvas.dataURL
I'm assuming the browsers do not support this part of html5 but I'm up for other assumptions.
Thanks for the help.
Some version of Android have problems with toDataUrl(); Here you can find an easy solution:
http://code.google.com/p/todataurl-png-js/wiki/FirstSteps
The script: http://todataurl-png-js.googlecode.com/svn/trunk/todataurl.js
Paste this in your head:
<script src="todataurl.js"></script>

javascript check if image exists iOS app

I am building a simple app for the iPad. As it is easier, I decided to go with HTML and a little bit of JavaScript, but I have hit a wall. How I can check in JavaScript if an image (local image) exists?
This might be useful http://www.irt.org/script/52.htm

using javascript to play audio just on iPad

Rather than repeat a long javascript for playing audio, here is the link: webpages.charter.net/jolove/Includes/play_song.js:.
This plays for any desktop browser (Mac or Windows), but not for my iPad.
Here is the calling website: webpages.charter.net/jolove/Escort_Folder/Dedication_Poem_iOS.html
This is really bugging me, so I would definitely appreciate any help on this, any help at all.
John Love
Not sure exactly what your question is, but you can use the HTML5 <audio> tag which is supported by the iPad. Check out http://developer.apple.com/safaridemos/audio.php or just google "HTML5 audio".
I'm almost forced to conclude that iPad will not play audio files.
Here is a very fresh site, where I use
the audio. But, this time, I got a button that says "cannot play audio file". For the sake of completeness, here is the included webpages.charter.net/jolove/Escort_Folder/js/play_song.js

Categories

Resources