All posts tagged ‘WebAPI’

File Under: Mobile, Web Standards

Video: Mozilla Developer Shows Off the Power of WebAPI

It wasn’t too long ago that Mozilla launched its WebAPI project, a cross-platform, web-based API for accessing features on mobile devices. If WebAPI succeeds it could provide an open, web-based alternative to the proprietary app systems on today’s mobile devices.

The goal of the WebAPI effort is to help web apps access the same features that platform-specific mobile apps enjoy. That way web apps could better compete with platform-native applications. Mozilla’s various WebAPIs aim to make it easier to build web apps that access your phone’s camera, GPS info, network status and accelerometer.

Now Mozilla’s Paul Rouget has put up a demo video of some of Mozilla’s WebAPIs in action. Rouget shows a number of demos, including what looks like it could be a very cool web-based camera app — a bit like Instagram, but available to anyone with a modern web browser.

If Mozilla’s WebAPI project sounds a bit familiar it may be that you’ve heard of the W3C’s Device APIs Working Group, which is attempting to define standards that cover much of the same device-to-web ground. In fact, some of Mozilla’s WebAPI project may eventually be rolled into the W3C’s efforts.

But, as Rouget mentions in the demo video, much of Mozilla’s effort is aimed at building the company’s Boot to Gecko mobile platform. The Boot to Gecko Project is Mozilla’s attempt to develop a mobile operating system that emphasizes standards-based web technologies. With that end goal in mind, Mozilla’s WebAPI may end up being somewhat different than what the W3C is trying to build.

For more details on Mozilla’s WebAPI efforts, check out the WebAPIs wiki which offers a complete list of the APIs and more details about Mozilla’s plans to standardize them.

Mozilla Builds Video Chat App Using Nothing but Web Standards

Mozilla recently showed off a demo of a video chat app built entirely from web standards. Most of the demo runs on top of the proposed Web Real Time Communication (WebRTC) standard, the W3C’s answer to the audio and video streaming capabilities once found only in proprietary plugins like Flash.

Mozilla’s demo movie shows two users signed in with BrowserID (recently renamed Persona) start a video chat right in the browser. The Persona features, combined with the SocialAPI add-on for Firefox, make the demo browser look a bit like Facebook or other social sites with a “buddy list” of currently signed in users available in the sidebar. Select a user from that list and just click the video chat link to start a call.

Currently Mozilla’s video chat demo requires an experimental build of Firefox and actually uses “a custom API intended to simulate the getUserMedia and PeerConnection APIs currently being standardized.” In other words, video chat in Firefox is still a long way from replacing Skype, but Mozilla does plan to bring at least preliminary support to Firefox later this year.

The short-term goal, according to Mozilla hacker Anant Narayanan, who narrates the video above, is to add WebRTC support to Firefox’s Nightly channel “by the end of this quarter.” Narayanan cautions that in the beginning support may be “limited to just getUserMedia and not the full PeerConnection.”

While the demo video focuses on making video calls work in the desktop browser, with help from some other elements in Mozilla’s larger WebAPI project — which is developing a set of APIs that will allow web apps to better compete with platform-native applications — web-based video chat could work on any device. We recently looked at Mozilla’s Camera API, which gives developers access to your device’s camera, and, in conjunction with these video chat tools, could theoretically bring video chat to mobile browsers as well.

For more info on the video chat experiment, including the source code for the demo, head over to the Mozilla Hacks blog.

Picture Better Web Apps With Mozilla’s Camera API

Mozilla is hard at work on a Camera API that will give web developers a way to access your phone’s camera. The Camera API will make it possible to build websites that can take pictures with your device’s camera and then upload them to that webpage. Throw in some CSS-based filters — perhaps a bit of JavaScript to add other image effects — and you’ve got Instagram, no native app necessary.

The Camera API is part of Mozilla’s larger WebAPI project, which is developing a set of APIs that will allow web apps to better compete with platform-native applications. To do that the WebAPI project will give developers access to your device’s hardware capabilities, like the camera, the calendar and even the vibration mechanism.

The WebAPI effort is a long way from complete, but the Camera API will work today on most Android devices. Mozilla’s Robert Nyman has a new post over at the Mozilla Hacks blog that walks through the basics of using the nascent Camera API, including a working demo you can test on your Android device using either Firefox or Chrome.

Bear in mind that, cool as the Camera API is, it’s not yet an official web standard. As with the rest of Mozilla’s WebAPI project, the Camera API is still very much in the development stage.

On the other hand, for those that want to experiment, the Camera API is much further along than some of the other WebAPIs. Adding to the appeal is the fact that the Camera API is being developed in conjunction with the W3C’s WebRTC spec, an effort to standardize a set of real-time audio and video streaming protocols. That means that an official standardized version of the Camera API will likely emerge sooner rather than later.

As it stands the Camera API is already supported in Firefox and Google Chrome on Android devices. Some of the other elements used in Nyman’s demo, like the JavaScript function createObjectURL are also supported in Internet Explorer 10. So far Apple’s Mobile Safari doesn’t support the Camera API or any of the JavaScript used to create the demo app.

For more info on Mozilla’s WebAPI efforts, check out the Mozilla wiki and for some additional Camera API ideas hit up the Mozilla Developer Network docs.

File Under: Browsers, Mobile, Web Apps

Mozilla’s WebAPI Wants to Replace Native Apps With HTML5

Mozilla has launched an ambitious new project aimed at breaking down the proprietary app systems on today’s mobile devices. The project, dubbed WebAPI, is Mozilla’s effort to provide a consistent, cross-platform, web-based API for mobile app developers.

Using WebAPI, developers would write HTML5 applications rather than native apps for iOS, Android and other mobile platforms.

Mozilla isn’t just talking about WebAPI, it’s already hard at work. It plans to develop the APIs necessary to provide “a basic HTML5 phone experience” within six months. After that the APIs will be submitted to the W3C for standardization.

Among the APIs Mozilla wants to develop are a telephone and messaging API for calls and SMS, a contacts API, a camera API and half a dozen more.

If those APIs sound vaguely familiar it might be because the W3C’s Device APIs Working Group is covering similar ground.

So, why the new effort from Mozilla? Well, Mozilla’s WebAPI is a part of its larger Boot to Gecko Project, which aims to eventually develop an operating system that emphasizes standards-based web technologies. With that end goal in mind, WebAPI may end up somewhat different than what the W3C is trying to build.

It’s also possible that Mozilla simply doesn’t want to wait for the Device APIs Working Group. Mozilla wants WebAPI up and running in a mere six months, the W3C’s Device APIs Work Group is unlikely to move that fast. But “the idea is to collaborate with W3C and all players and together form a good solution, and not just dump it on them,” says Mozilla Technical Evangelist Robert Nyman in a comment on his post announcing WebAPI.

The dream of write-once, run-anywhere software is nothing new and, if history is any guide, Mozilla’s WebAPI efforts may well be doomed. The open source giant does have one thing going for it that most other efforts have not — the open web. Most write-once, run-anywhere attempts have come from companies like Adobe and were built around proprietary frameworks. WebAPI doesn’t suffer from vender lock-in the way some projects have. WebAPI’s main roadblock is convincing other mobile web browsers to support the APIs.

For WebAPI to appeal to developers, Mozilla will need Apple, Google and other mobile browser makers to implement the APIs so that WebAPI can compete with native applications. Before you dismiss that as an impossibility, bear in mind that Apple’s original vision for iOS app development was based around HTML applications, and you’d be hard-pressed to find a company more eager to embrace web apps than Google. Whether either company will devote any resources to implementing WebAPI remains to be seen. But if Mozilla can get WebAPI standardized by the W3C other browser makers would likely support it.

Mozilla’s plans for WebAPI are certainly ambitious, but the company is putting its money where its mouth is — Mozilla is currently hiring several full time engineers to work on WebAPI.

See Also: