Difference between revisions of "Tizen Player"

From MSX - Wiki
Jump to navigation Jump to search
Line 22: Line 22:
 
| <code>tizen:buffer:timeout</code> || <code>{SECONDS}</code> || <code>"tizen:buffer:timeout": "20"</code> || <code>setTimeoutForBuffering({SECONDS});</code> || '''Yes''' || data-sort-value=128|'''0.1.128'''
 
| <code>tizen:buffer:timeout</code> || <code>{SECONDS}</code> || <code>"tizen:buffer:timeout": "20"</code> || <code>setTimeoutForBuffering({SECONDS});</code> || '''Yes''' || data-sort-value=128|'''0.1.128'''
 
| Sets up the buffer timeout in seconds. The default buffer timeout is <code>"20"</code>. Please see <code>AVPlay</code> API for possible values.
 
| Sets up the buffer timeout in seconds. The default buffer timeout is <code>"20"</code>. Please see <code>AVPlay</code> API for possible values.
|-
 
| <code>tizen:custom:duration</code> || <code>{SECONDS}</code> || <code>"tizen:custom:duration": "60"</code> || n/a || '''Yes''' || data-sort-value=128|'''0.1.128'''
 
| Sets up a custom duration in seconds. If a custom duration is set, only that duration is displayed during playback. It can be used for live data to disable the progress feature. The duration <code>"-1"</code> re-enables the progress feature.
 
|-
 
| <code>tizen:custom:position</code> || <code>{SECONDS}</code> || <code>"tizen:custom:position": "0"</code> || n/a || '''Yes''' || data-sort-value=128|'''0.1.128'''
 
| Sets up a custom position in seconds. If a custom position is set, only that position is displayed during playback and it is not possible to seek to another position (instead a <code>custom:tizen:seek</code> event is triggered). It can be used for live data to disable the seek feature. The position <code>"-1"</code> re-enables the seek feature.
 
|-
 
| <code>tizen:custom:state</code> || <code>{VIDEO_STATE}</code> || <code>"tizen:custom:position": "2"</code> || n/a || '''Yes''' || data-sort-value=128|'''0.1.128'''
 
| Sets up a custom state. If a custom state is set, only that state is displayed during playback and it is not possible to change it (instead a <code>custom:tizen:play</code> or <code>custom:tizen:pause</code> event is triggered). It can be used for live data to disable the play/pause feature.
 
 
* <code>"-1"</code>: Re-enables the play/pause feature
 
* <code>"1"</code>: Stopped (Not supported)
 
* <code>"2"</code>: Playing
 
* <code>"3"</code>: Paused
 
 
|-
 
|-
 
| <code>tizen:display:area</code> || <code>{REL_X},{REL_Y},{REL_W},{REL_H}</code> || <code>"tizen:display:area": "0,0,1,1"</code><br/><code>"tizen:display:area": "0.125,0,0.75,1"</code><br/><code>"tizen:display:area": "0,0.119,1,0.762"</code> || <code>setDisplayRect({ABS_X}, {ABS_Y}, {ABS_W}, {ABS_H});</code> || '''Yes''' || data-sort-value=128|'''0.1.128'''
 
| <code>tizen:display:area</code> || <code>{REL_X},{REL_Y},{REL_W},{REL_H}</code> || <code>"tizen:display:area": "0,0,1,1"</code><br/><code>"tizen:display:area": "0.125,0,0.75,1"</code><br/><code>"tizen:display:area": "0,0.119,1,0.762"</code> || <code>setDisplayRect({ABS_X}, {ABS_Y}, {ABS_W}, {ABS_H});</code> || '''Yes''' || data-sort-value=128|'''0.1.128'''

Revision as of 14:30, 11 February 2021

The Tizen player is the default player for Samsung TVs (2016+ models) that is used in Media Station X version 0.1.128 or higher. It works like a plugin and can be configured via the extended properties of a content item. Please see Extended Properties for more information. Additionally, you can interact with it using the player:commit actions. Please see Internal Actions for more information. Some extended properties are dynamic and can be changed via an action at runtime. Please see #Runtime Usage for more information.

Some extended properties are mapped to a corresponding Tizen (i.e. AVPlay) function. For more information, please visit: https://developer.samsung.com/smarttv/develop/api-references/samsung-product-api-references/avplay-api.html

Note: All properties are reset if a new video/audio is played.

Syntax[edit]

Property syntax of extended properties for Tizen player
Property Value Example Tizen Function Dynamic Since Version Description
tizen:buffer:size {SECONDS} "tizen:buffer:size": "10" setBufferingParam("PLAYER_BUFFER_FOR_PLAY", "PLAYER_BUFFER_SIZE_IN_SECOND", {SECONDS});
setBufferingParam("PLAYER_BUFFER_FOR_RESUME", "PLAYER_BUFFER_SIZE_IN_SECOND", {SECONDS});
No 0.1.128 Sets up the initial and resume buffer size in seconds. The default buffer size is "10". Please see AVPlay API for possible values.
tizen:buffer:size:init {SECONDS} "tizen:buffer:size:init": "10" setBufferingParam("PLAYER_BUFFER_FOR_PLAY", "PLAYER_BUFFER_SIZE_IN_SECOND", {SECONDS}); No 0.1.128 Sets up the initial buffer size in seconds. The default buffer size is "10". Please see AVPlay API for possible values.
tizen:buffer:size:resume {SECONDS} "tizen:buffer:size:resume": "10" setBufferingParam("PLAYER_BUFFER_FOR_RESUME", "PLAYER_BUFFER_SIZE_IN_SECOND", {SECONDS}); No 0.1.128 Sets up the resume buffer size in seconds. The default buffer size is "10". Please see AVPlay API for possible values.
tizen:buffer:timeout {SECONDS} "tizen:buffer:timeout": "20" setTimeoutForBuffering({SECONDS}); Yes 0.1.128 Sets up the buffer timeout in seconds. The default buffer timeout is "20". Please see AVPlay API for possible values.
tizen:display:area {REL_X},{REL_Y},{REL_W},{REL_H} "tizen:display:area": "0,0,1,1"
"tizen:display:area": "0.125,0,0.75,1"
"tizen:display:area": "0,0.119,1,0.762"
setDisplayRect({ABS_X}, {ABS_Y}, {ABS_W}, {ABS_H}); Yes 0.1.128 Sets up the display area with relative coordinates. The default area is "0,0,1,1", which fills the entire screen. Please see AVPlay API for possible values.

Note: If this property is set, the property tizen:display:mode will be set to "PLAYER_DISPLAY_MODE_FULL_SCREEN", which fills the entire area (by strechting the video image).

tizen:display:mode {DISPLAY_MODE} "tizen:display:mode": "PLAYER_DISPLAY_MODE_LETTER_BOX"
"tizen:display:mode": "PLAYER_DISPLAY_MODE_FULL_SCREEN"
"tizen:display:mode": "PLAYER_DISPLAY_MODE_AUTO_ASPECT_RATIO"
setDisplayMethod({DISPLAY_MODE}); Yes 0.1.128 Sets up the display mode. The default mode is "PLAYER_DISPLAY_MODE_LETTER_BOX", which fills the entire screen (by keeping the video aspect ratio). Please see AVPlay API for possible values.

Note: If this property is set, the property tizen:display:area will be set to "0,0,1,1".

tizen:ready {ACTION} "tizen:ready": "info:Tizen player ready." n/a Yes 0.1.128 Sets up an action that is executed if the player is ready (i.e. the internal state is "READY"). Please see AVPlay API for more information.
tizen:start {ACTION} "tizen:start": "info:Tizen player started." n/a Yes 0.1.128 Sets up an action that is executed if the player is started (i.e. the internal state is "PLAYING" or "PAUSED"). Please see AVPlay API for more information.
tizen:stream:{STREAM_TYPE} {STREAM_VALUE} "tizen:stream:PREBUFFER_MODE": "5000"
"tizen:stream:ADAPTIVE_INFO": "FIXED_MAX_RESOLUTION=7680X4320"
"tizen:stream:ADAPTIVE_INFO": "BITRATES=5000~10000|STARTBITRATE=HIGHEST|SKIPBITRATE=LOWEST"
setStreamingProperty({STREAM_TYPE}, {STREAM_VALUE}); No 0.1.128 Sets up a stream specific property. Please see AVPlay API for possible values.
tizen:track:audio {TRACK_INDEX} "tizen:track:audio": "1" setSelectTrack("AUDIO", {TRACK_INDEX}); Yes 0.1.128 Selects an audio track by indicating the index. Please see AVPlay API for more information.
tizen:track:text {TRACK_INDEX} "tizen:track:text": "1" setSelectTrack("TEXT", {TRACK_INDEX}); Yes 0.1.128 Selects a text track by indicating the index. Please see AVPlay API for more information.

Runtime Usage[edit]

It is possible to change some extended properties via an action at runtime and to request data from the Tizen player.

Action syntax for Tizen player
Syntax & Example Data Tizen Function Since Version Description

player:commit:message:{PROPERTY}:{VALUE}
player:commit:message:tizen:buffer:timeout:20
player:commit:message:tizen:custom:duration:60
player:commit:message:tizen:display:area:0,0,1,1
player:commit:message:tizen:track:audio:1
player:commit:message:tizen:track:text:1

n/a n/a 0.1.128 Sets up an extended property during runtime.

Note: Only the dynamic properties can be set at runtime.

Please see #Syntax for more information.

player:commit
{
   "key": "{PROPERTY}",
   "value": "{VALUE}",
   "action": "{ACTION}",
   "data": null
}
n/a 0.1.128 Sets up an extended property during runtime and optionally executes an action on completion.

Note: Only the dynamic properties can be set at runtime.

Please see #Syntax for more information.

interaction:commit:response:request:player:info
interaction:commit:response:request:player:info:base
interaction:commit:response:request:player:info:custom
interaction:commit:response:request:player:info:display
interaction:commit:response:request:player:info:buffer
interaction:commit:response:request:player:info:stream
interaction:commit:response:request:player:info:tracks

n/a

getVersion();
getState();
getCurrentStreamInfo();
getTotalTrackInfo();

0.1.128 Requests info data from the player and commits the response to the interaction plugin. Please see AVPlay API for more information.

interaction:commit:response:request:property:{STREAM_TYPE}
interaction:commit:response:request:property:IS_LIVE
interaction:commit:response:request:property:AVAILABLE_BITRATE
interaction:commit:response:request:property:GET_LIVE_DURATION
interaction:commit:response:request:property:CURRENT_BANDWIDTH

n/a getStreamingProperty({STREAM_TYPE}); 0.1.128 Requests a stream specific property from the player and commits the response to the interaction plugin. Please see AVPlay API for more information.

interaction:commit:response:request:properties:{STREAM_TYPE}|{STREAM_TYPE}|{STREAM_TYPE}
interaction:commit:response:request:properties:IS_LIVE|AVAILABLE_BITRATE|GET_LIVE_DURATION

n/a getStreamingProperty({STREAM_TYPE}); 0.1.128 Requests multiple stream specific properties from the player and commits the response to the interaction plugin. Please see AVPlay API for more information.