html5

Translating a html5 canvas

I want to know how I can translate an entire scene already drawn on an html5 canvas, for example 5 pixels down. I know the translate method just translates the canvas' coordinate system, but I want to know if there is a way to translate the entire scene that is already drawn onto the canvas. ...

Draw a cross at the mouses location on a canvas, non persistently

I have this bound to the mousemove event of my canvas: function(e){ var contDiv = $('#current_system_map'); var offset = contDiv.offset(); x = e.clientX-offset.left; y = e.clientY-offset.top; context.beginPath(); context.moveTo(0,y); context.lineTo(595,y); context.moveTo(x,0); context.lineTo(...

How do I wait for first canvas-repaint until @font-face-font is loaded?

I have a HTML5-canvas and write text with context.fillText(...); using a @font-face-font. Displaying the page with Firefox (3.6) I have the problem, that on the first paint of the canvas the font is not downloaded yet so the text will be displayed with a standard-font. I found a 'solution' here but it does not work, because the font is o...

Using YouTubes new iframe method of embedding, how can you tell the video status? (playing, paused, complete)

The HTML5 method of embedding YouTube videos: I'm currently trying to get the players state, I have Googled and searched for a while and can not find anything. I have found examples on how to get the players state for the tag, so if I could find a way to use the tag only I could go that route. Thanks ...

Does iPhone/iPad Safari require 'Accept-Ranges' header for video?

Hello, I've been having problems serving videos from my dev server that play in mobile Safari. My dev server does not support the 'Accept-Ranges' header and after reading a few forums I've discovered that may be my problem. Here is an example forum posting saying just that. Is this correct? Does mobile Safari require the Accept-Ran...

HTML5 video tag on iPhone OS 3 is appearing outside a layer that has overflow: hidden;

I have an HTML5 video tag in a layer that has 'overflow: hidden;' set on it, but the video shows up outside the overflow area. It's essentially an accordion control, so the layer the video is in will be closed by default, and then when activated it will open up with a little slide down animation. Unfortunately, because the video isn't re...

Periodically detecting specific strings inside of an HTML element

I have a div element with contenteditable set to true, and I want to detect whether a certain string exists within the element, and if so, style it, giving the appearance of syntax highlighting (I've already looked at existing libraries/scripts, and none of them work the way I need them to). What would be the best solution to this, whil...

Enabling offline application storage in webkit based cocoa app

What is required to enable offline web app caching for apps using the WebKit class to load web pages? Right now, if I attempt to load the app cache like so: cache = window.applicationCache I get: DOMApplicationCache oncached: null onchecking: null ondownloading: null onerror: null onnoupdate: null onobsolete: null onprogress: null...

Web-based Circular Interface Frontend - No Graphics!

How would you create the front-end for a web-based circular interface that does not involve using graphic files or Flash? ...

how to draw complex shapes on the html canvas tag with the best performance?

I am using the HTML canvas tag to draw around 3000, vector lines on a small area (900x500) the target platform is mobile which has inherently lower spec'd hardware. On my desktop I can make the 3000 vector lines render, using moveto and lineto in about 25ms. However on the mobile device it's more like 700ms which is significantly slower....

Web iPad app - how to differentiante between one- and two- finger scrolls.

Doing Web app for iPad clients, but need to recognize where user is doing one- and whe two-finger scrolls. Anybody know how to implement it? Any convenient jQuery plug in or something? Thanks. ...

Add attribute 'checked' on click jquery

Hi there, I've been trying to figure out how to add the attribute "checked" to a checkbox on click. The reason I want to do this is so if I check off a checkbox; I can have my local storage save that as the html so when the page refreshes it notices the checkbox is checked. As of right now if I check it off, it fades the parent, but if I...

In the summer of 2010 is it time to start using HTML5?

I created this question as community wiki in the hope that it and its answers will be edited as the situation with HTML5 changes. Time to use HTML5? This question gets trotted out about once a year, so I might be beating a dead horse, but is it finally time (in the summer of 2010) to use HTML5 when developing a brand new web site? Rel...

What makes Silverlight an engaging and compelling technology?

There seems to be increasing demand for Silverlight skills, but out of the many new technologies that Microsoft has punted, I've never felt as if it was the next big thing! Am I wrong? Should I be gaining those skills? There's obviously a well-established competitor in Flash, and there's a host of other Rich Internet toolkits out there,...

Buggy Behavior using Canvas?

I am making a game using html canvas. Here is my progress: http://db.tt/ei3LlR (use WASD and Left/Right Arrow keys) Helps to ZOOM. My questions are: Why does the shadow flicker in google chrome when the tank is turning? Why does the turret image flicker in safari when the turret is turning? Why does it work fine in Firefox? ...

Javascript Git client

Is there a Javascript implementation of Git? I'm wanting to use HTML5 to create a rich Javascript application and have the idea that I could use git to track changes to the data. So, I'm wondering if there is a javascript implementation of a git client, or maybe some way of controlling a git repository by making POST requests. ...

How can I make a fixed floating menu for Android?

I am trying to make a floating menu to be at the bottom of the page. I have it working with Chrome but for some reason on Android it doesnt scroll right. Ive seen a ton of people have this problem online and there was an doctyper-iphone solution but I tried it on my droid and it crapped out...it almost worked though. http://208.229.14...

Add another image on top of a drawn image on canvas, then have it respond to onclick event, is it possible?

Here's a canvas app I come across : canvasphoto (uses YUI 2 I believe, which I haven't used before). It displays images on a canvas and it lets you resize/move the images across the canvas. What I want to do is to add a close button on the top right side of the images drawn on the canvas and have it trigger an onclick event when clicked ...

HTML5 video tag

Hi friends, Iam using safari version-5 and i need to run html5 VIDEO tag in this browser.I have used this code to run it... <!DOCTYPE HTML> <html> <body> <video controls="controls" autoplay="autoplay"> <source src="sample_mpeg4.mp4" type="video/mp4" /> This is it </video> </body> </html> When i run this script nothing is display...

Get image line co-ordinates for canvas

I just started to work with canvas. I need to simulate some image in pure canvas. image => tool => [1, 20, 80, 45.....] => canvas => canvas render image some picuture coordinates this picture but rendered(created) via canvas Are there any tools that help to get image lines coordinates (to map)? So, next, I could just use th...