Results 101 - 120 of 124

Web Audio API

The Web Audio API involves handling audio operations inside an audio context, and has been designed to allow modular routing. Basic audio operations are performed with audio nodes, which are linked together to form an audio routing graph. Several sources — with different types of channel layout — are supported even within a single context. This modular design provides the flexibility to create complex audio functions with dynamic effects.
API Guide Overview Reference Référence Web Audio API

Basic concepts behind Web Audio API

The Web Audio API involves handling audio operations inside an audio context, and has been designed to allow modular routing. Basic audio operations are performed with audio nodes, which are linked together to form an audio routing graph. Several sources — with different types of channel layout — are supported even within a single context. This modular design provides the flexibility to create complex audio functions with dynamic effects.
audio Audio concepts Guide Media Web Audio API

Visualizations with Web Audio API

To extract data from your audio source, you need an AnalyserNode, which is created using the AudioContext.createAnalyser() method, for example:
analyser API fft Guide visualisation visualization waveform Web Audio API

Using the Web Speech API

The Web Speech API provides two distinct areas of functionality — speech recognition, and speech synthesis (also know as text to speech, or tts) — which open up interesting new possibilities for accessibility, and control mechanisms. This article provides a simple introduction to both areas, along with demos.
API Guide recognition speech synthesis Tutorial Using Web Speech API

Using the Web Storage API

Storage objects are simple key-value stores, similar to objects, but they stay intact through page loads.  The keys and the values are always strings (note that integer keys will be automatically converted to strings, just like what object do). You can access these values like an object, or with the getItem() and setItem() methods.  These three lines all set the colorSetting entry in the same way:
API Guide localStorage sessionStorage Storage storage Web Storage API

Matrix math for the web

Matrices can be used to represent transformations of objects in space, and are an important tool to use in visualizations on the Web. This article explores how to create matrices and use them with CSS3 transforms and the matrix3d transform type.
3D CSS3 Guide matrices matrix transform3d WebGL

Using HTML sections and outlines

The HTML5 specification brings several new elements to web developers allowing them to describe the structure of a web document with standard semantics. This document describes these elements and how to use them to define the desired outline for any document.
Advanced Example Guide HTML HTML5 Outlines Overview Sections sections Web

Using the application cache

HTML5 provides an application caching mechanism that lets web-based applications run offline. Developers can use the Application Cache (AppCache) interface to specify resources that the browser should cache and make available to offline users. Applications that are cached load and work correctly even if users click the refresh button when they are offline.
Advanced App appcache application cache Cache Guide HTML web cache

Regular Expressions

Regular expressions are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects. These patterns are used with the exec and test methods of RegExp, and with the match, replacesearch, and split methods of String. This chapter describes JavaScript regular expressions.
Guide Intermediate JavaScript Reference regex RegExp Regular Expressions

Working with objects

JavaScript is designed on a simple object-based paradigm. An object is a collection of properties, and a property is an association between a name (or key) and a value. A property's value can be a function, in which case the property is known as a method. In addition to objects that are predefined in the browser, you can define your own objects. This chapter describes how to use objects, properties, functions, and methods, and how to create your own objects.
beginner Beginner Comparing object Constructor Document Guide JavaScript Object

Battery Status API

The Battery Status API, more often referred to as the Battery API, provides information about the system's battery charge level and lets you be notified by events that are sent when the battery level or charging status change. This can be used to adjust your app's resource usage to reduce battery drain when the battery is low, or to save changes before the battery runs out in order to prevent data loss.
API Apps Battery Battery API Battery Status API Firefox OS Guide Mobile Overview

Determining the dimensions of elements

There are several properties you can look at in order to determine the width and height of elements, and it can be tricky to determine which is the right one for your needs. This article is designed to help you make that decision.  Note that all these properties are read-only.  If you want to set the width and height of an element, use  width and height; or, the overriding min-width and max-width, and min-height and max-height properties.
client height Client width CSSOM View Guide Intermediate NeedsCompatTable NeedsSpecTable offsetHeight offsetWidth size of displayed content

Using the Data Store API

To explain the main functionality of Data Store, we have build two examples that work together (you can download these from Github using the code below, and experiment with them as you wish):
B2G Data Store API Database Firefox OS Guide Storage storage

Media Capture and Streams API (Media Streams)

The Media Capture and Streams API, often called the Media Stream API or the Stream API,  is an API related to WebRTC which supports streams of audio or video data, the methods for working with them, the constraints associated with the type of data, the success and error callbacks when using the data asynchronously, and the events that are fired during the process.
Advanced API Audio audio Guide Media Capture and Streams API Media Streams API NeedsContent video Video

PromiseWorker.jsm

A PromiseWorker is a ChromeWorker except instead of calling postMessage() to send a message, you call post(), which returns a Promise. JavaScript files imported into the worker scope and main thread scope which allows posting to the worker and receiving in the form of a promise. Like ChromeWorker objects, PromiseWorker is mostly used for js-ctypes but it is not limited to that. There is no XPCOM access, similar to ChromeWorker. This answers the question "When should I use a PromiseWorker?", and the answer is, whenever you would normally use a ChromeWorker, but want postMessage to return promises.
add-ons Add-ons API Extensions Guide js-ctypes NeedsContent Workers

Using the Push API

The W3C Push API offers some exciting new functionality for developers to use in web applications: this article provides an introduction to getting Push notifications setup and running, with a simple demo.
API Experimental Guide JavaScript Push Push API Service Workers web push