Tuesday, October 25, 2011

The future of Web development

A new Opera labs release shows couple of interesting things:

a) a first look at how a browser can split content into native pages. This proof of concept implements CSS3 extensions to split content into pages that can be "turned" in a natural manner through gestures rather than point and click, control the positioning/floating of figures in multi-column layouts more precisely and provide a consistent navigation system for such content that is independent of your documents.

For example, turning the contents of an entire web page into a rudimentary paged experience is as simple as including the following in your page:

@media -o-paged {
html {
height: 100%;
overflow: -o-paged-x;

b) support for getUserMedia HTML5 API. For example, it is how to get camera's content in JavaScript:

// Replace the source of the video element with the stream from the camera
var video = document.getElementById('sourcevid');
if (navigator.getUserMedia) {
navigator.getUserMedia('video', successCallback, errorCallback);
function successCallback(stream) {
video.src = stream;
function errorCallback(error) {
console.error('An error occurred: [CODE ' + error.code + ']');
} else {
console.log('Native web camera streaming (getUserMedia) is not supported in this browser.');

No comments: