Archive | html5 RSS feed for this section

Adobe Loves HTML5: HTML5 extension pack for Dreamweaver CS5

Just 2 weeks ago at Web2.0 Expo, Kevin Lynch promised that Adobe would create the best tools in the world to author HTML5 and CSS3. Today Adobe is pleased to make a technology release available of the Dreamweaver CS5 HTML5 Pack extension. This extension provides initial support for HTML5 and CSS3 in Adobe Dreamweaver CS5, and helps you easily create  HTML5 pages and CSS3 styles.

Available now on Adobe Labs!

Here is Adobe’s Jorge Taylor showing the capabilities of the HTML5 extension pack for Dreamweaver CS5.

Read full storyComments { 2 }

Flash is as open as HTML5

How’s that for a controversial title? But… It’s true… Hear me out!

First of all let me say that I have absolutely nothing against HTML5! Innovation and competition is always good and keeps everyone on their toes. UPDATE: I also want to emphasize that this is not a fight. HTML5 and Flash can live together just fine and can even complement each other!

One of the first blog posts I read this morning was one on AppleInsider. An Apple spokeswoman claimed that Adobe’s Mike Chambers got it all backwards when he blogged about Apple’s closed system. That’s not the part that made me cringe though. She said that “it is HTML5, CSS, JavaScript, and H.264 that are open and standard, while Adobe’s Flash is closed and proprietary“.

Ok… So… Let’s analyze that a little bit… Let’s begin with the biggest claim here: H.264. Last time I checked, H.264 was far from open. It is owned by a private organization known as MPEG LA who said earlier this year that “Internet Video that is free to end users would continue to be exempt from royalty fees until at least December 31, 2015“. Nobody knows what is going to happen after 2015. The patents awarded to MPEG LA don’t expire until 2028. So… to make this clear… H.264 is not open.

So what about HTML5, CSS and JavaScript… Those are open, right? Well yeah. The specs are open meaning that everyone can download those specs and build an application around it to display that language. Hey… Wait a minute… That sounds a lot like Flash! The specs for FLV (Flash video), SWF (the file format for Flash Player), AMF (the binary format for exchanging data) and RTMP (the protocol used for transmission of audio, video, and data) are all published and can be downloaded by anyone.

The specs for HTML5 are decided by the Web Hypertext Application Technology Working Group (WHATWG). The WHATWG was founded by individuals of Apple, the Mozilla Foundation, and Opera Software in 2004, after a W3C workshop. Apple, Mozilla and Opera were becoming increasingly concerned about the W3C’s direction with XHTML, lack of interest in HTML and apparent disregard for the needs of real-world authors. Anyone can participate as a Contributor by joining the WHATWG mailing list. The same goes for Flash. Our bugbase is open to anyone and anyone can view bugs and add feature requests.

But the Flash runtime is closed! Ok… Sure… Flash Player is not open source although some parts are. That said… Ask yourself this: Is your browser open source? The only browser that is completely open source is Firefox. Safari is only partly open source (only the WebKit engine). The same can be said about Chrome (in the Chromium project). However, the biggest HTML runtime out there –Internet Explorer (still used by over 50% of all internet users)– is as closed as Flash Player. And so is Opera (even though they are part of the WHATWG).

And with that, I come back to the title of this post: Flash is as open as HTML5 = HTML5 is as open as Flash.

UPDATE: You should also read “HTML5 canvas proprietary Apple technology?” by Leo Bergman and “I’d rather be a Woz” by nothingGrinder. Hat tip to Philippe and Aaron who posted this in the comments.

Note: I’m sure many of you will have some comments on this topic and I have no problem with your comments as long as you keep them constructive and on topic.

Note 2: For those who saw a drop in the comment count: I just disabled and deleted Topsy trackbacks. These are not comments but automatic pingbacks from RTs on Twitter.

(Image credit: Justin Marty)

Read full storyComments { 45 }

The HTML5 Flash Marriage: Geolocation source

Last Friday I blogged about how HTML5 and Flash could also just work together. A few people have asked if they could get the source files. I just packaged and uploaded the FLA, ActionScript class and HTML files. Download the zip file here.

A few people have also noted that the demo doesn’t work across different platforms even when using the same browser. While I wanted to demonstrate how Flash and HTML5 can coexist and even complement each other, it is (sadly) also a demonstration on how HTML5 is being implemented differently across browsers and operating systems. Feel free to post a comment if you know about fixes or workarounds in the JavaScript to make it work on more browsers.

Read full storyComments { 4 }

The HTML5 Flash Marriage: Geolocation

I probably don’t need to tell you that there’s a lot of buzz (and fuzz) about how HTML5 is going to kill Flash. You probably know how I feel about this… I think the web is big enough for both of them… Even better… I think they could potentially complement each other!

Geolocation is a good example. HTML5 is going to get a geolocation API that works just beautifully even on devices with no GPS. Flash based applications will (currently) only get access to geolocation APIs when targeting the AIR runtime on mobile. Some browsers (I only know of Firefox 3.5 on Mac and the WebKit browser on the Nexus One) already support the HTML5 geolocation API… So why not use that to get geo information into your Flash based application?

It’s actually extremely easy to do…

But first a little bit of background as to why I was looking for this functionality. I’m actually building “this demo app” that needs the geolocation in order to have the functionality I was looking for. I want this app to work in as many places as possible. With the Flash Platform I can build this for my browser and my desktop. For the Apple phone I can export it as a native app and for the Nexus One I can use the device browser with Flash Player 10.1.

Now… How does it work? The HTML5 geolocation API is extremely easy to use and, like I said earlier, you don’t even need to have a GPS enabled device.

function getGEO()
{
	// First check if your browser supports the geolocation API
	if (navigator.geolocation)
	{
		alert("HTML 5 is getting your location");
		// Get the current position
		navigator.geolocation.getCurrentPosition(function(position)
		{
			lat = position.coords.latitude
			long = position.coords.longitude;
			// Pass the coordinates to Flash
			passGEOToSWF(lat, long);
		});
	} else {
		alert("Sorry... your browser does not support the HTML5 GeoLocation API");
	}
}
function passGEOToSWF(lat,long)
{
	alert("HTML 5 is sending your location to Flash");
	// Pass the coordinates to mySWF using ExternalInterface
	document.getElementById("mySWF").passGEOToSWF(lat,long);
}

In my Flash application, I’m using ExternalInterface so I can communicate between JavaScript and my SWF. When my Google Maps component is ready, I call the GetGEO JavaScript method:

ExternalInterface.call("getGEO");

When the JavaScript method gets a result from the geolocation API, it will pass it on to the passGEOToSWF method. In my Flash application, I just listen for that method call and then call the code to update the map.

ExternalInterface.addCallback("passGEOToSWF", onPassGEOToSWF);

If you don’t have an HTML5 ready browser, check out this video of the application running in Firefox 3.6. Even cooler is that this also works in the browser on my Flash Player 10.1 enabled Nexus One (Please note that the network is slower on the N1 and thus it isn’t able to keep up with loading new map images. This has nothing to do with Flash Player 10.1 or the application.):

If you have Firefox 3.5 or newer installed, you can give it a try yourself: http://www.webkitchen.be/geolocation. I’m sure there are other browsers out there that also already have the geolocation API but this is the only one I tested on the Mac.

Hopefully this gives you a good idea of how HTML5 and Flash can also just work together (instead of killing each other ;-)). Flash on!

UPDATE: While writing this blog post, @robertbak pinged me on Twitter saying that he wrote a library to use in your Flex applications. Check it out on the Flex Exchange.

UPDATE: For the source files check out this blogpost.

Read full storyComments { 39 }