×

Capturing media

Introduction

With the introduction of Nokia Asha web apps Version 3.0 support has been added for the input tag attributes accept and capture, which enable web apps to capture and save images and video recorded with the phone's camera.

Use

The following code shows an example of the use of the accept and capture attributes. In this code a still image is captured from the camera.

<input type="file" name="camera_image" accept="image/*" capture="camera" size="20"/>

Supported values

The following values of accept and capture are supported:

  • accept="image/*" to capture a still image from the smartphone's camera.
  • accept="video/" to capture a video from the smartphones' camera.
  • capture="camera".

Storage location

All images and video captured are stored in the smartphone's default file locations for video and image storage. Where the phones doesn't provide for a memory card or when a memory card isn't installed, the default locations are the Video or Photos folder in the phone's memory. When a memory card is installed, the Video and Photos folders on the memory card are used as the default location,

Code Example

An example web app illustrating the use of this media capture feature is available in the Web Developer Environment, from the Samples tab. The example is MediaCaptureSample.

User experience

The user experience when capturing media is described in the Capturing Media topic of the Design Library.


Last updated 7 October 2013

Back to top