Firefox

You are currently browsing the archive for the Firefox category.

“skid mark”

A new phrase that I learned yesterday. Probably something that’s been around computers for a long time, but it was my first exposure to it.

Basically a “skid mark” is something you leave in code as a signature so that in a crash dump you can figure out how you got there.

We’ve been doing a huge amount of work in Firefox 3.5 and 3.6 to reduce the number of crashes. For some crashes we have stack traces, but not a lot of data on how we got to that stack. So we’re actually checking in code changes and and shipping them into the wild to see how they change crash signatures.

The interesting thing is that it’s working – we’ve been able to track down some pretty serious crashes with this technique.

Today at the Mozilla all hands I saw two cool things:

1. A decent sized (600×400 or so) Theora video playing on a Nokia N900, decoding on the DSP with the main CPU kept at around 50%. (Pulseaudio is about 10-15% of that, and the rest of Vorbis decoding and some work to get the video onto a fullscreen texture.) This is based on David Schleef’s Theora-on-DSP work and it’s showing real promise.

2. With Bas’ Direct2D windows build, I’m able to play a 1080p Theora (test here) video on my Lenovo X200s and it’s smooth as butter. Fully scaled, full framerate, full screen, no drops. Pretty amazing. And he’s only doing scaling in that code, not yet doing the YUV->RGB conversions so there’s still a huge amount of room to improve here.

All good improvements for HTML5 and open video.

One Cloud? by liberato

One Cloud? by liberato

This really wonderful post by Anil Dash echos a lot of what I’ve been talking about in the context of the larger web. I had a discussion with Ben Galbraith recently about this topic during a Mozilla lunch. He and I took (intentionally) different positions on topics to see what kind of discussion we could stimulate around how developers see the web platform.

Ben has some concern that the web platform isn’t as coherent as those that you find from the other big players – the iPhone platform, Silverlight, Java or any of the other giant siloed stacks. (Actually Ben was more interested in the capabilities of those platforms vs. the web, but I’ll talk about that later.) I’m basically of the opinion that the web that we have, and as messy as it seems, actually produces pretty good results. That the incrementalism and experimentation that we’ve seen from web browser vendors results in what I call “developer-friendly incompatibility.” That those changes are eventually codified to standards and taken mainstream because they degrade well and we can learn as we go. (Kind of like life!)

But it does raise an interesting question – what capabilities do we need to have for the web that are found in these stacks? And can they be applied in an incremental fashion? We’re starting to see that with video being promoted as a first class citizen with Flash as a trailing edge fallback. We’re starting to see the web pick up 3D capabilities with participation from Google, Apple and Mozilla. And we have the pretty wonderful library model that has produced jQuery, jQuery UI, mootools, YUI, dojo and many others – all of which come from pushing complexity to the edges of the web community.

But is it enough? Discuss. What’s missing, and what’s interesting? I would particularly love to hear from Java and Silverlight developers. What do you really love about those platforms? Is source-as-delivery and incrementalism enough?

Chris Jones has put together a demo video of a super-early stage Gecko-driven browser that’s multi-process.  It’s super-duper early and realizing that we’re only in Phase I of the roadmap is important but it’s great to see such speedy progress. Release early, release often!

Today Dailymotion, one of the world’s largest video sites, announced support for open video. They’ve put out a press release, a blog post on the new openvideo site as well as a demo site where you can see some of the things that you can do with open video and Firefox 3.5.  They are automatically transcoding all of the content that their Motion Makers and Official Users create and expect to have around 300,000 videos transcoded into the open Ogg Theora and Vorbis formats.  You can view the site they have up at openvideo.dailymotion.com.

I’d like to personally thank the wonderful people at Dailymotion, along with Paul and Tristan who helped bring this project to the point where it is today.  Dailymotion has been an excellent test case for us because they haven’t just encoded with the formats that we support but also built a full-fledged player using HTML, CSS and JavaScript that looks, feels and acts like the flash-based players we see on the web today.  They also make it possible to embed open video using an clever <object> tag that loads the video content safely in an HTML page.

Standing on the twin pillars of the HTML5 video API and royalty-free codecs, the movement to bring open video to the web is well underway. Dailymotion, along with Wikipedia and the Internet Archive, have all committed to start serving up open video.  The free encoders are getting better and better over time and we’re starting to see more interest in the technologies.

Dailymotion, Mozilla and a large number of other partners will be at the Open Video Conference on June 19th and 20th.  If you’re interested in talking with us you might want to come down to the conference and learn what’s happening with video on the web.

Google has announced the availability of a plugin that implements 3D technology and makes it available over the web. You can read about the announcement in in the Google Code Blog and in an excellent article by Ryan Paul in Ars Technica.

Ryan points out that there are significant differences between what Google has built here and what we’ve built. I thought it might be worth it to expand on that a bit since it isn’t explained in depth in the Ars article.

Google’s 3D work is a plugin.  So much like how Flash or Silverlight works you get a rectangle in the browser to draw into.  They provide a high level scene graph API which uses the COLLADA format for loading objects underneath.  It’s a very large chunk of code.  If you take a look at the API and click around at the packages and classes you can see that there’s a lot there.  Their use case is games and game-like things – virtual worlds.  So it’s a great piece of work, but it’s also at a very high level.

Mozilla’s current proposal to Khronos is a very simple API that’s a wrapper around OpenGL ES 2.0.  It’s currently available as an extension to Firefox 3.5 and is likely to be rolled into a version of Firefox after 3.5.  The proposal is very focused on 3D.  For example, we didn’t try to include video or audio because those are being covered by other web standards and we’re interested in making sure they are well integrated instead of trying to wrap those into a 3D spec.  We’ve bound it to the canvas element so you can use it in much the same way you use the current canvas 2D context.  Things like asset loading (via COLLADA or other systems) are things we haven’t dealt with because those can be handled entirely outside of the 3D api and layered on top of it.  (Later in this post you’ll understand why this is important.)  But the important thing is that it’s something that you can easily mix with the rest of the open web.  Open Video and Audio, CSS, HTML, Canvas 2D, Canvas 3D, etc – you should be able to mix them all together and that’s our goal.

So these two 3D things from Mozilla and Google are pretty different.  Not really competitive, either, because they have such different goals.  The Google software is a very high level API 3D graphics API and what we’re proposing is more akin to the low level graphics API that those high-level systems are built on.

Given the title of the google blog post (“Towards an open web standard for 3D graphics”) it’s important to point out these differences since they affect how the standards process might look, and what the output might be.  We’ve been through this a few times with different standards and it’s easy to point out what the key success factors are to build a successful standard.  Here’s a quick iteration on those principals in my mind:

1. It’s important to keep the scope as small as possible.

The smaller the scope of the standard, the easier it is to understand the interaction of the various parts, what your goals are and what it takes to build an interoperable implementation.  It’s also the easiest thing you can do to remain as future-proof as possible.  It’s easier to add new APIs later if your scope is very very small.

2. Clear rules for interaction with the rest of content.

How does it work with the rest of the HTML spec?  CSS?  Video?  Images?  How can you copy content in and out?  Can you use them as textures?  These are just some of the questions that you have to raise as a way to describe how something like this might work with content.  Once again, this is gated on #1 above – if the functionality is simple then the interactions can generally be pretty simple as well.

3. Allow the scope to change slowly over time.

Understanding that technology – especially on the web – does not exist in a vacuum outside of time.  Standards do change over time and understanding how people use technology in the real world is the best possible way to understand how something should change and improve.  Understanding that standards are an iterative process is important.  Note that in #1 above – controlling scope – I mention that it’s important to keep things future-proofed via small and simple APIs.  This is why – because you know that you will need to improve that API once you understand how people are using it in the field.

4. Allow most of the innovation to happen next to and on top of your API.

Last point – your standard should allow as much iteration and work to happen on top of your API as possible.  This allows you to learn as much as possible about how people are using your software and gives them huge amounts of freedom to experiment and teach you about what you need to improve in the next iteration.  If people are stretching your APIs and finding gaps in performance, you can add convenience APIs to make things faster – as long as they are simple APIs.  We saw this in the real world with the JS libraries (dojo, jQuery) – we’ve been optimizing our engines and APIs over time to assist them as they have pushed our browsers to the limits.  But we would not have known had we tried to implement everything that the libraries could have possibly done at the browser level.

OK, so those are the things that we think make for a successful standards process.  I’ll point out one particular example of a dichotomy that I believe illustrates these rules so that people understand what I’m talking about: Canvas vs. SVG + SMIL.

Canvas is a very simple API (more info), much like what we’ve proposed to Khronos for 3D support.  It’s well-scoped, well understood and integrates very well with other web technologies.  And it’s been getting a huge amount of traction on the web.  People are writing all kinds of really neat technology on top of it, including useful re-usable libraries for visualization.  Have a look through Google’s own promotional site for Chrome – a huge number of them use canvas.  It has traction.  And we’ve gone through a couple of iterations – we’ve added support for text and a couple of other odds and ends once we understood what people were trying to do with it.

Now compare this to SVG and SMIL.  Each of those specs are multi-hundred page documents with very large APIs and descriptions of how to translate their retained-mode graphics into something that’s usable on the web.  (SVG 1.1 is a 719 page PDF.  SVG 1.2 Tiny is 449 pages.  The spec for SMIL is a 2.7MB HTML file.)  We’ve seen some implementation of SVG and SMIL in browsers, but it’s been slow in coming and hasn’t seen full interoperability testing nor any real pick up on the web.  The model for these specs was wrong, and I think it shows.

So I’ve spent some time talking about the context for standardization and what makes standards successful.  How does this related to our stuff or Google’s stuff?  Well, quite a bit actually.  If we want something that browser vendors can easily implement, we need to understand that context and what we’re trying to standardize.  Much of the work that Google did happened before browsers got as fast as they have, so there’s a good reason why they felt that they needed to implement so much of the code as native code and deliver it as a plugin.  Their API is a good example of what a scenegraph API would look like on top of Canvas 3D.  JS engines have gotten a lot faster since they started their plug-in and we think that it’s time that we start using them.  Hence a low-level API that we can build on.

There’s a lot of great stuff going on with 3D on the web.  We’ll be working with Google (and others!) via the Khronos group to try and standardize on a low-level API that browsers can support.  It’s going to be a really fun year and I’m happy that we’re working to drive the web forward.

This is essentially a re-post of what both Tristan and Paul wrote up, but I thought it was worth re-posting because it’s that good.

If you have Firefox 3.1b3 you can try the demo here.

Chris Double posted about this but I thought it might be worth it to put together a simple video screencast of what this actually looked like in practice. It’s a damn neat idea and opens up all kinds of possibilities. Once again, with video as a first class citizen on the web, what can people dream up?

At Mozilla we do a lot of releases. Every few weeks, we’ll do a minor release to fix security issues and improve the reliability of the browser. On the 3.0 branch, for example, we’re up to Firefox 3.0.7.  7 releases in 9 months is a pretty blistering pace.  For a long time we were also doing releases of Firefox 2 in parallel with Firefox 3.  Oh, and we were pushing out an occasional alpha or beta release of Firefox 3.1 (soon to be 3.5) too.  If there’s one thing we do at Mozilla it’s get software out the door.

One of the things that we do when we do a release is try to have a “canonical url” for each release.  For major releases, it’s like the url above – a mozilla.com release page.  But for the betas we usually have a post ready in our Mozilla Developer News Weblog.  For the new Firefox 3.1 Beta 3 release, we had a post ready ahead of time and knew what the URL would be.

But ahead of this release one of the things I did was to set up a short url on bit.ly for the release.  One of the nice things about bit.ly is that it lets you track information as people click through the url.  You can see people clicking through the short link for our release at the associated info url for that particular short url.  This is what it looked like a little while after the release:

The data flow is a little flaky and I hate that it goes from live to past week (2 hours to daily is a pretty rough transition) but it’s great to be able to see the effect that particular posts can have on the traffic.  It’s also interesting to see the traffic sources in the graph as well.  It gives you a good sense of where people are reading information and generating click through traffic.

What’s really interesting is that you can take the bit.ly url and use it to track posts on twitter by using twitter search.  Here’s what I found after coming back from dinner last evening:

This was after a post from the @mozillafirefox account which has about 14,000 followers or so.

Search also lets you follow what people’s reactions are as well.  In our case we’re using the #firefoxbeta tag to follow what people are saying.  I’ve been able to interact with some people about their experiences with add-ons compatibility and problems they have had with the release.  (Surprisingly few problems, actually.)  But mostly it’s just fun to watch people talk about how fast this release is when they actually use it.

Tools like twitter search have also let Mozilla set up the Release Rapid Response Team (RRRT).  This small team of people collects information from twitter, identi.ca, facebook, weblogs and other places and raises common issues for our development and support teams to look at.  As an example, here’s the RRRT list for Firefox 3.0.7.  (Yep, it’s a short list but that’s a pretty good sign.)

It’s great being able to passively listen or interact directly with people on the product and I think it’s part of a sea change in search, social networks and product support.  It’s going to close the gap between comsumers/users and the people who produce those products.  And I also personally believe that it’s going to require that companies be more authentic in the way that they operate.  Not only can companies see what users are doing in real time, consumers can also see what companies are doing as well.  The transparency is two-way.

At Mozilla we’ve found ways to adapt and turn it into something that’s really useful.  I wonder what other projects + companies are doing with these new tools?

Some of you might have noticed that I was able to use a fallback in my previous posts that include a native video tag. I was going to do a post on how that works. It’s pretty simple.

But Chris Double beat me to the punch and has an excellent little tutorial about how he’s using the video tag with elegant fallbacks. (In his post you can use something other than the Java-based fallback. In my case I linked back to vimeo.)

Enjoy!

« Older entries