AVPlayStore API

To use Samsung Product API, 

<script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script>

Should be loaded in index.html

Tizen Multimedia Framework supports playback of various types of formats. It supports playback of both audio and video content. Actual source data which user wants to play, could be stored on local device or hosted on a HTTP/HTTPS server or streamed using MMS protocol or it could be hosted on any content provide's network and streamed using adaptive streams like Smooth Stream, HLS, and DASH.

WEBAPIs are exposed which could be easily used by app or widget developer to support multimedia playback for audio or video. Media playback of local content or remote content (hosted on any network server) could all be play back using these APIs. These APIs abstracts all the internal complexities of streaming/de-muxing/decoding/rendering from the user of these APIs.

Once valid AVPlayStore object is available, and then using this object open should be called. This will now ensure that a valid Core Player component's instance is associated with AVPlayStore object.

Now, since AVPlayStore object has been successfully created, event callback listener could be associated. This can be done using the API setListener through AVPlayStore object. This would be responsible for receiving various asynchronous events related to media handling from internal media pipeline.

Now, we can call prepare through AVPlayStore object. Once this call is successful, it means source element is created and is connected further in pipeline.

After previous point, it has reached to PREPARED state. It is ready to go to PLAYING state now. This will be done calling the API play through AVPlayStore object.
Now, media playback will start.

Since media playback has started, various types of user-requested operations could be performed over this playback. User can request to stop, seek to forward position, seek to backward position, start fast forward, retrieve the duration of total media, change the display co-ordinates etc. using the APIs like stop, jumpforward, jumpbackward, setSpeed, getDuration.

AVPlayStore object supports various functionalities related to multi-media. It also supports Adaptive-Streaming. Smooth streaming; HLS, DASH etc. are supported.
User might be interested to set adaptive streaming parameters like "startbitrate", "start-adaptive-switching" etc. This could be achieved through API
setStreamingProperty which could be called using AVPlayStore object. Similarly, AVPlayStore object supports retrieval of streaming related parameters through API getStreamingProperty.

AVPlayStore object also supports playback of encrypted media content. Multimedia framework is responsible for loading the DECRYPTION element in Gstreamer pipeline. Widget or APP could pass the DRM related information like "license server URL", "SOAP header" etc through API setDrm.

Since : 1.0

Table of Contents

  1. 1. Interfaces
    1. 1.1. AVPlayStoreManagerObject
    2. 1.2. AVPlayStoreManager
  2. 2. Full WebIDL

Summary of Interfaces and Methods

Interface Method
AVPlayStoreManager AVPlayManagerObject getPlayer();

1. Interfaces

1.1. AVPlayStoreManagerObject

The AVPlayStoreManagerObject interface defines what is instantiated by the Webapis object from the Tizen Platform.
The webapis.avplaystore object allows access to the functionality of the AVPlayStore API.

[NoInterfaceObject] interface AVPlayStoreManagerObject {
    readonly attribute AVPlayStoreManager avplaystore;

WebApi implements AVPlayStoreManagerObject;

Since : 1.0


  • readonly AVPlayManager avplay
    Namespace for AVPlayStore API.

    Since : 1.0

1.2. AVPlayStoreManager

The AVPlayStoreManager interface provides the functionalities of playing video content.

[NoInterfaceObject] interface AVPlayStoreManager {
    AVPlayManagerObject getPlayer();                        

Since : 1.0


It provides a convenient way of creating single or multiple instance of player.
However, we have open() API which is available with webapis.avplaystore to create the player.
You can use the open or getPlayer API to manipulate the single player instance efficiently.
But for pre-buffering use cases we have provided another handy API getPlayer() which is available with webapis.avplaystore only.
Pre-buffering feature is basically used by player when use case like advertisement need to be injected in between the actual content playback.
This is one of the typical example. This feature can be used for switching among the multiple playbacks.
Application developer is required to use webapis.avplaystore.getPlayer to get the player instance. When called multiple times multiple player instance would be available.
But please note however that multiple player instances is available multiple parallel playback is not supported by player at a single point of time. This feature only
supports multiple pre-buffering but single playback at a time.

AVPlayManagerObject getPlayer();

Since : 1.0

Return value:

- TRUE or FALSE status in form of JSObject. If API execution fails, exception object would be returned back with error string.


  • WebAPIException
    • with error type InvalidStateError, if player state is not IDLE

    • with error type SecurityError, if the application does not have the privilege to call this method.

    • with error type UnknownError, if the player open failed because of a platform error.

    • with error type RangeError, if the player instance exceeds four.
      NOTE : Due to memory limitations, If platform can't make the player instance, RangeError exception would be generated.

Code example:

var playerinstance = webapis.avplaystore.getPlayer();

module AVPlayStore {
    [NoInterfaceObject] interface AVPlayStoreManagerObject {
        readonly attribute AVPlayStoreManager avplaystore;
    WebApi implements AVPlayStoreManagerObject;

    [NoInterfaceObject] interface AVPlayStoreManager {   
         AVPlayManagerObject getPlayer();