Progressive playback ("progressive download" or "HTTP streaming") is a method for downloading media over the Internet where the media player can begin playback before the download is complete. Unlike streaming media, progressive playback does not support adapting the download to the client's needs, such as available bandwidth or media quality preferences. In progressive playback, a media file is downloaded as fast as possible in its original format, and playback begins as soon as there is sufficient data available for playback.
The Series 40 platform supports progressive playback for audio from 3rd edition Feature Pack 2 onwards and for video from 5th Edition Feature Pack 1 onwards. The supported content types for progressive playback are listed in section Content types.
To create a Player for progressive playback, use the Manager.createPlayer
method with one of the following media locators:
http://
resource://
The file URL for the Player must include the name of the audio file together with a format suffix. If the format suffix is missing, progressive playback cannot be performed. The following is a valid locator for progressive download:
Player player = Manager.createPlayer("http://somelink.com/source.mp3");
Progressive playback can also be used with Players
created from an InputStream
or DataSource
.
For example, the following is also a valid player instantiation for progressive playback:
HttpConnection connection = (HttpConnection) Connector.open("http://somelink.com/source.mp3"); InputStream inputStream = connection.openInputStream(); Player player = Manager.createPlayer(inputStream, "audio/mp3");
In addition, for progressive playback to work in your MIDlet, do one of the following:
Add the following attribute to the MIDlet's JAD file:
progressive_download: enabled
Create the Player
using a media locator that
contains the streamable
parameter set to true
. For example:
http://my_media_file.mp3?streamable=true resource://my_media_file.mp3?streamable=true
Note: Progressive playback is ignored for
Players
that use the file://
locator, since the data is
wholly available and does not need to be streamed before playback.Progressive playback does not support metadata.
For more information about using InputStream
,
see article Playing_large_audio_files_by_using_InputStream_throws_an_OutOfMemoryError in the Nokia Developer Wiki.
A 3G network connection is recommended to achieve smooth streaming. Progressive playback is supported only for the following content types on Nokia Asha software platform devices:
Audio Channel |
Video Channel |
File Extension |
---|---|---|
amr |
MPEG4 Visual / MPEG4 part 2 |
.3gp |
aac |
H.264 |
.3gp |
With other types, the media data is downloaded completely before playing. Successful video playback is subjected to variables such as fps (frames per second), size of video and sampling ratio.
Size of video: 320 x 240
Frames per second: 15 fps
Sampling ratio: 188 Kbps
An example of progressive download can be found here: How_to_listen_to_radio_in_Java_ME]
Progressive recording works like progressive playback,
expect that data is progressively uploaded (recorded) rather than
downloaded and only audio recording is supported. Progressive recording
is always enabled when creating a Player
for recording
audio. To create the Player
, use the Manager.createPlayer
method with the media locator capture://audio
.
Progressive recording is supported from Series 40 5th Edition onwards. Progressive recording is supported for all audio content types supported by the platform. The supported content types are listed in section Content types.