- Tutorials:
stbPlayer instance.
Not accessible in global scope.
Can't be manually created but can be received from other STB global objects.
Members
(static) id :number
Unique system player identifier.
Type:
- number
(static, readonly) surface :stbSurface
A surface linked with this player.
Type:
(static, readonly) capabilities :stbPlayer~capabilitiesConfig
Get run-time player capabilities.
Type:
Example
// output player autoFrameRate support
console.log(stbPlayerManager.list[0].capabilities.autoFrameRate);
(static) conversionMode3D :number
Current 3D conversion mode.
Possible values:
Value | Description |
---|---|
0 | Treat video as normal 2D video. Default mode. In case of top-bottom or side-by-side 3D video player displays both stereo views so TV can reproduce 3D video (with half resolution). If TV is 3D capable and video contains information about 3D then TV will be automatically switched to 3D mode. |
1 | Treat video as 3D video in top-bottom(over-under) format with half resolution of each stereo view. In that mode player will stretch top half of the video into fullscreen according to specified aspect. |
2 | Treat video as 3D video in top-bottom(over-under) format with full resolution of each stereo view. In that mode player will stretch top half of the video into fullscreen according to specified aspect. The difference between STB_3D_MODE_TOP and STB_3D_MODE_TOP_HALF is that STB_SetAspect with other than auto mode gives different behaviour and in case of resulting video will be Full resolution HD. |
3 | Treat video as 3D video in side-by-side format with half resolution of each stereo view. In that mode player will stretch left half of the video into fullscreen according to specified aspect. |
4 | Same as STB_3D_MODE_FULL but without automatic TV switch to 3D. |
Type:
- number
(static, readonly) statistics :stbPlayer~statisticsConfig
Get player statistics.
Type:
Example
// output video decoding error count
console.log(stbPlayerManager.list[0].statistics.decodingErrors);
(static) mute :boolean
Mute state of audio output.
This is a combination of master mute state (see stbAudioOutput.mute
) and local player state.
After the cycle of switching off/on with this property the volume level remains unchanged.
Type:
- boolean
(static) volume :number
Current volume level in percents (0 - no sound, 100 - maximal level).
This is a combination of master volume level (see stbAudioOutput.volume
) and local player volume level.
Type:
- number
(static) audioPID :number
Number (PID) of the current audio track [0..0x1fff].
This property should be accessed after the event 2
occurs (see description of events).
On set if a specified track is absent the PID will be ignored.
The list of all audio tracks determined by the player can be received with stbPlayer.audioTracks
.
Type:
- number
(static, readonly) audioTracks :Array.<stbPlayer~audioTrackConfig>
Get the list of audio tracks in the stream.
This property should be accessed after the event 2
occurs (see description of events).
Type:
- Array.<stbPlayer~audioTrackConfig>
Example
// 2 audio tracks in the stream:
// Russian AC3 having PID 114 and English mp3 having PID 115
[
{
pid: 114,
lang: ['rus', 'ru'],
type: 3,
title: 'Description'
},
{
pid: 115,
lang: ['eng', ''],
type: 2,
title: 'Description'
}
]
(static) dolbyDigitalAudioMode :number
Operational Mode for DolbyDigital audio.
Affects only DolbyDigital audio.
Possible values:
Value | Description |
---|---|
0 | RF mode |
1 | Line mode |
2 | Custom0 |
3 | Custom1 |
Type:
- number
(static) audioLanguages :Array.<string>
Preferred audio track languages to be automatically selected
when receiving the information on the channel and several audio tracks are present.
It's a 2/3–symbol tags according to ISO 639 in order of priority.
For best results use ISO 639-1, 639-2/T and 639-2/B at the same time.
Type:
- Array.<string>
Examples
// just French
['fr', 'fra', 'fre']
// French - primary, English - secondary
['fr', 'fra', 'fre', 'en', 'eng']
(static) subtitleLanguages :Array.<string>
Preferred subtitles track languages to be automatically selected
when receiving the information on the channel and several subtitles tracks are present.
It's a 2/3–symbol tags according to ISO 639 in order of priority.
For best results use ISO 639-1, 639-2/T and 639-2/B at the same time.
Type:
- Array.<string>
Examples
// just French
['fr', 'fra', 'fre']
// French - primary, English - secondary
['fr', 'fra', 'fre', 'en', 'eng']
(static) audioPrimaryLanguage :string
- Deprecated:
- Yes
- See:
Primary audio track language to be automatically selected
when receiving the information on the channel and several audio tracks are present.
It's a 2/3–symbol tags according to ISO 639 (for example, "ru", "rus", "en", "eng").
If such track is not found, the track with the language stbPlayer.audioSecondaryLanguage
is selected.
Type:
- string
(static) audioSecondaryLanguage :string
- Deprecated:
- Yes
- See:
Secondary audio track language to be automatically selected
when receiving the information on the channel and several audio tracks are present.
It's a 2/3–symbol tags according to ISO 639 (for example, "ru", "rus", "en", "eng").
If not found the first track from the list is selected.
Type:
- string
(static) subtitlesPrimaryLanguage :string
- Deprecated:
- Yes
- See:
Primary subtitles track language to be automatically selected
when receiving the information on the channel and several subtitles tracks are present.
It's a 2/3–symbol tags according to ISO 639 (for example, "ru", "rus", "en", "eng").
If such track is not found, the track with the language stbPlayer.subtitlesSecondaryLanguage
is selected.
Type:
- string
(static) subtitlesSecondaryLanguage :string
- Deprecated:
- Yes
- See:
Secondary subtitles track language to be automatically selected
when receiving the information on the channel and several subtitles tracks are present.
It's a 2/3–symbol tags according to ISO 639 (for example, "ru", "rus", "en", "eng").
If not found the first track from the list is selected.
Type:
- string
(static) enableSubtitles :boolean
Activate/deactivate subtitles output.
For MAG100 subtitles are displayed only in full screen mode.
Type:
- boolean
(static) subtitlesPID :number
Number (PID) of the current subtitles track [0..0x1fff].
This property should be accessed after the event 2
occurs (see description of events).
The list of all subtitles track determined by the player can be received with stbPlayer.subtitlesTracks
.
Type:
- number
(static, readonly) subtitlesTracks :Array.<stbPlayer~subtitlesTrackConfig>
Get the list of subtitles tracks in the stream.
This property should be accessed after the event 2
occurs (see description of events).
Type:
- Array.<stbPlayer~subtitlesTrackConfig>
Example
// 2 subtitles tracks in the stream:
// Russian AC3 having PID 114 and English having PID 115
[
{
pid: 114,
lang: ['rus', 'ru']
},
{
pid: 115,
lang: ['eng', ''],
teletextPage: 250,
type: 'graphic' // or 'text'
}
]
(static) subtitlesColor :number
- Default Value:
- 0xffffff
Subtitles color in RGB format.
Type:
- number
Example
// set red color for text subtitles
stbPlayer.subtitlesColor = 0xff0000;
(static) subtitlesEncoding :string
- Default Value:
- UTF-8
Encoding which will be used to display external subtitles.
For example: "utf-8", "cp1250", "cp1251", ..., "cp1258", "iso8859-1", ..., "iso8859-16"
Type:
- string
(static) subtitlesFont :string
Font filename for displaying text subtitles.
For example: '/home/default/arial.ttf'.
Type:
- string
(static) subtitlesOffset :number
Vertical offset of subtitles from the video window bottom border.
Type:
- number
(static) subtitlesSize :number
- Default Value:
- 20
Size of text subtitles (in pixels).
Type:
- number
(static, readonly) bufferLoad :number
Get the current buffer loading in percents [0..100].
It makes sense to call this function only with the following solutions:
ffmpeg, ffrt, ffrt2, ffrt3, fm, file
after getting event 2
and before complete buffer filling or before getting event 4
.
Type:
- number
(static) duration :number
Total length of the current content in seconds.
Type:
- number
(static) durationMs :number
Total length of the current content in milliseconds.
Type:
- number
(static) position :number
Current media position from the beginning of content in seconds.
Type:
- number
Fires:
- stbPlayer.event:onPlayStart
(static) positionMs :number
Current media position from the beginning of content in milliseconds.
Type:
- number
Fires:
- stbPlayer.event:onPlayStart
(static) positionPercent :number
Current media position from the beginning of content in percents with fraction part.
Type:
- number
Fires:
- stbPlayer.event:onPlayStart
Example
// position is 50% and a half of a percent
50.5
(static) loop :boolean
Playback repeat mode.
Type:
- boolean
(static) speed :number
Current speed of playing.
Available only on supported devices with some media sources.
Possible values:
Value | Description |
---|---|
0.25 | quarter speed |
0.5 | half speed |
1 | normal |
2 | 2x |
4 | 4x |
8 | 8x |
12 | 12x |
16 | 16x |
32 | 32x |
64 | 64x |
-0.25 | backward quarter speed |
-0.5 | backward half speed |
-1 | backward normal |
-2 | backward 2x |
-4 | backward 4x |
-8 | backward 8x |
-12 | backward 12x |
-16 | backward 16x |
-32 | backward 32x |
-64 | backward 64x |
Type:
- number
(static, readonly) speeds :Array.<number>
All available playing speed values for current media.
Collected with some delay after playback start.
Type:
- Array.<number>
(static, readonly) state :number
Current state of player.
Value | Description |
---|---|
0 | idle |
1 | opening (between stbPlayer.play method call and event 4 ) |
2 | currently is playing |
3 | paused |
Type:
- number
(static) HLSInfo :Object|null
Get bitrate information of currently played HLS stream.
Fields:
Name | Description |
---|---|
currentBitrate | currently active bitrate |
bitrateList | list of all bitrates in a stream and can be empty (available only for Apple HLS streams) |
Type:
- Object | null
Examples
{
currentBitrate: 533981,
bitrateList: [323613, 533981, 755232, 1384811, 2020273]
}
// for non-HLS streams
null
(static) metadataInfo :Object
Get metadata information stored in current content.
For example, it can be data from ID3 tag from mp3 file or info from iso/bluray/dvd.
It's better to request this information in stbPlayer.onTracksInfo
callback (after getting event 2
).
Type:
- Object
Examples
{
album: "album_1",
album_artist: "artist_1",
artist: "artist_1",
comment: "",
composer: "",
copyright: "",
date: "2000",
disc: "",
encoder: "",
encoded_by: "",
filename: "",
genre: "",
language: "",
performer: "",
publisher: "publisher_1",
title: "track_9",
track: "9"
}
{
infoType: "dvdinfo",
titleCount: 10,
infoCurtitle: 4,
titles: [
{
Titleduration: 15000,
chapterCount: 1,
chapters: [{startTime: 0, duration: 0}]
},
{
Titleduration: 7459000,
chapterCount: 9,
chapters: [
{startTime: 0, duration: 916000},
{startTime: 916000, duration: 772000},
{startTime: 1688000, duration: 636000},
{startTime: 2324000, duration: 148000},
{startTime: 2472000, duration: 1208000},
{startTime: 3680000, duration: 796000},
{startTime: 4476000, duration: 884000},
{startTime: 5360000, duration: 1204000},
{startTime: 6564000, duration: 896000}
]
},
{
Titleduration: 150000,
chapterCount: 1,
chapters: [{startTime: 0, duration: 151000}]
},
{
Titleduration: 90000,
chapterCount: 1,
chapters: [{startTime: 0, duration: 91000}]
},
{
Titleduration: 154000,
chapterCount: 1,
chapters: [{startTime: 0, duration: 155000}]
},
{
Titleduration: 140000,
chapterCount: 1,
chapters: [{startTime: 0, duration: 141000}]
},
{
Titleduration: 125000,
chapterCount: 1,
chapters: [{startTime: 0, duration: 126000}]
},
{
Titleduration: 67000,
chapterCount: 1,
chapters: [{startTime: 0, duration: 68000}]
},
{
Titleduration: 139000,
chapterCount: 1,
chapters: [{startTime: 0, duration: 140000}]
},
{
Titleduration: 136000,
chapterCount: 1,
chapters: [{startTime: 0, duration: 137000}]
}
]
}
(static) videoInfo :Object
Get information about current video content.
This property should be used after receiving event 7
from list of the events used.
Available fields:
Name | Description |
---|---|
frameRate | video frame rate |
bitRate | video bitrate in bits (since v344) |
width | encoded video width |
height | encoded video height |
hPAR and vPAR | horizontal and vertical pixel aspect ratio coefficients in example these params mean that movie aspect ratio is: (704*hPAR/vPAR)/576 = 1.333333333(3) = 4:3 for square pixels |
Type:
- Object
Example
{
frameRate: 25000,
bitRate: 2000000
width: 704,
height: 576,
hPAR: 12,
vPAR: 11
}
(static) fullscreen :boolean
Video window state.
There are some use cases involving fullscreen and viewport:
Case 1: viewport is partial, fullscreen switch to true
Result: viewport will switch to maximum and enable auto viewport maximization on video resolution changes
Case 2: viewport is maximized, fullscreen switch to false
Result: viewport will remain maximized and disable auto viewport maximization on video resolution changes
Case 3: viewport is maximized, fullscreen switch to true
Result: viewport will remain maximized and enable auto viewport maximization on video resolution changes
Case 4: fullscreen is true, viewport switch to partial
Result: fullscreen will switch to false and disable auto viewport maximization on video resolution changes
Case 5: fullscreen is false, viewport switch to partial
Result: fullscreen will remain false with disabled auto viewport maximization
Case 6: fullscreen is false, viewport switch to maximized
Result: fullscreen will remain false with disabled auto viewport maximization
Type:
- boolean
(static) videoWindowMode :number
Video window control mode.
Value | Description |
---|---|
0 | the device automatically switches on the video window at the beginning of playing and switches it off when stops |
1 | video window is displayed |
2 | video window is not displayed |
Type:
- number
(static) aspectConversion :number
Video format conversion.
Value | Description |
---|---|
0 | as it is (video is stretched for the whole screen) |
1 | letterbox mode (video is proportionally enlarged to the size of the screen along the larger edge) |
2 | pan and scan mode (video is proportionally enlarged to the screen size along the lesser edge) |
3 | combined mode (intermediate between letterbox and pan and scan) |
4 | enlarged mode |
5 | optimal mode |
Type:
- number
(static, readonly) viewport :stbPlayer~viewportConfig
Get video surface position and size.
Type:
(static, readonly) clip :stbPlayer~clipConfig
Get clipping rectangle for input video.
Type:
(static) enableTeletext :boolean
- Default Value:
- false
Enable/disable teletext.
Type:
- boolean
(static) teletextVisible :boolean
- Default Value:
- false
Show/hide teletext.
Type:
- boolean
(static) teletextOpacity :number
- Default Value:
- 1
Setup opacity level for teletext [0 .. 1].
Type:
- number
Example
// normal teletext
stbPlayer.teletextOpacity = 1;
// almost transparent teletext
stbPlayer.teletextOpacity = 0.1;
(static) teletextPID :number
Number (PID) of the current teletext track [0..0x1fff].
This property should be accessed after the event 9
occurs (see description of events).
The list of all subtitles track determined by the player can be received with stbPlayer.teletextTracks
.
Type:
- number
(static, readonly) teletextTracks :Array.<stbPlayer~teletextTracksConfig>
Get the list of teletext tracks in the stream.
This property should be accessed after the event 9
occurs (see description of events).
Type:
- Array.<stbPlayer~teletextTracksConfig>
Example
// 2 teletext tracks in the stream:
// Russian AC3 having PID 114 and English having PID 115
[
{
pid: 114,
lang: ['rus', 'ru']
},
{
pid: 115,
lang: ['eng', '']
}
]
(static, readonly) teletextViewport :stbPlayer~viewportConfig
Get teletext viewport position and size.
Type:
(static) teletextSubtitlesDefaultCharset :stbPlayer~teletextCharsetConfig
Current active teletext subtitles default charset.
Type:
(static) teletextSubtitlesForceCharset :stbPlayer~teletextCharsetConfig
Current active teletext subtitles forced charset.
Type:
(static) teletextDefaultCharset :stbPlayer~teletextCharsetConfig
Current active teletext default charset.
Type:
(static) teletextForceCharset :stbPlayer~teletextCharsetConfig
Current active teletext forced charset.
Type:
(static) multicastProxy :stbBrowser~proxyConfig|null
Get/set multicast current web proxy configuration.
If multicast proxy configuration is set and multicast proxy enabled then any multicast rtp://
or udp://
stream
will be played back via multicast proxy e.i. instead of rtp://239.1.1.1:1234
player play the following stream: [proxy_addr]/rtp/239.1.1.1:1234
.
Type:
- stbBrowser~proxyConfig | null
Examples
// get current proxy
console.log(stbPlayer.multicastProxy);
'http://user1:pass1@16.16.16.16:3128'
// reset proxy
stbPlayer.multicastProxy = null;
// another identical way
stbPlayer.multicastProxy = '';
(static) httpHeaders :Object.<string, string>
- Default Value:
- {}
Current HTTP headers.
Type:
- Object.<string, string>
(static) checkSSLCertificate :boolean
- Default Value:
- true
Enable or disable SSL certificate checking while playing back HTTPS streams.
Type:
- boolean
Methods
(static) clearStatistics()
- See:
-
- stbPlayer.statistics}.
Clear player statistics.
(static) drawSubtitle(text, startopt, endopt)
Show text string as a subtitle on screen.
In case when start
and end
equal 0 or not set, text is shown on screen immediately until next stbPlayer.drawSubtitle
is called or 30 seconds elapsed.
If this function was called then subtitles will work only via stbPlayer.drawSubtitle
until next call of stbPlayer.play
.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
text |
string | this text will be shown on screen as a subtitle |
|
start |
number |
<optional> |
string presentation start time in ms from start of current media |
end |
number |
<optional> |
string presentation end time in ms from start of current media |
(static) loadExternalSubtitles(url)
Load text subtitles from external subtitle file of srt, sub, ass formats.
If subtitles are loaded successfully then external subtitle track will be added to subtitle track list with number(PID) 0x2000.
If any error occurs while loading subtitles then JS API user will receive event 8
from List of the events used.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | external subtitles address can be a local URL: |
(static) setViewport(viewport, clipopt)
Apply video surface position and size in pixels and clipping rectangle for input video.
It's possible to set only some properties (not all of them at once).
Examples
// full setup
stbPlayer.setViewport(
{
x: 0,
y: 0,
width: 1280,
height: 720
},
{
x: 10,
y: 10,
width: 1260,
height: 700,
save: true
}
);
// partial setup
// move video rectangle 100 px left
stbPlayer.setViewport({x: 100});
// resize video rectangle only horizontally
stbPlayer.setViewport({width: 500});
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
viewport |
stbPlayer~viewportConfig | video surface position and size |
|
clip |
stbPlayer~clipConfig |
<optional> |
optional clipping rectangle for input video |
(static) play(config)
Start playing the given media content.
Parameters:
Name | Type | Description |
---|---|---|
config |
stbPlayer~playConfig | content playback options |
Fires:
- stbPlayer.event:onPlayStart
(static) stop()
Stop playing.
stbPlayer.resume
shall begin playing from the beginning.
(static) pause()
Pause current playback.
stbPlayer.resume
continues playing from the current position.
(static) resume()
Continue playing (after stbPlayer.pause
)
or begin anew (after stbPlayer.stop
).
(static) rotate(angle)
Rotate player but works only for images.
Parameters:
Name | Type | Description |
---|---|---|
angle |
number | rotates the video window contents by the preset angle relative to the initial position allowed values: 0, 90, 180, 270. |
(static) onPlayEnd()
- See:
-
stbEvent.onEvent
(event 1)
The player reached the end of the media content or detected a discontinuity of the stream.
(static) onTracksInfo()
- See:
-
stbEvent.onEvent
(event 2)
Information on audio and video tracks of the media content is received.
It's now possible to call stbPlayer.audioTracks
, stbPlayer.metadataInfo
etc.
(static) onContentInfo()
- See:
-
stbEvent.onEvent
(event 7)
The decoder has received info about the content and started to play.
It's now possible to call stbPlayer.videoInfo
.
(static) onPlayStart()
- See:
-
stbEvent.onEvent
(event 4)
Video/audio playback has begun.
(static) onPlayError()
- See:
-
stbEvent.onEvent
(event 5)
Error when opening the content: content not found on the server or connection with the server was rejected.
(static) onTracksError()
- See:
-
stbEvent.onEvent
(event 8)
Error occurred while loading external subtitles.
(static) onDualMono()
- See:
-
stbEvent.onEvent
(event 6)
Detected DualMono AC-3 sound.
(static) onTracksUpdate()
- See:
-
stbEvent.onEvent
(event 9)
Found new teletext or subtitles in stream.
(static) onRTPBreak()
- See:
-
stbEvent.onEvent
(event 129)
When playing RTP-stream the numbering of RTP-packets was broken.
(static) setTeletextViewport(config)
Apply teletext viewport position and size.
Parameters:
Name | Type | Description |
---|---|---|
config |
stbPlayer~viewportConfig | teletext viewport position and size |
(static) teletextCommand(command)
Run teletext command.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
command |
number | possible values:
|
(static) reset()
Restore the default player state.
Affects playback, viewport, clears statistics, turns off subtitles and teletext, disables loop.
(static) execExternalProtocolCommand(id, command, params) → {string}
Send command to player's external protocol plugin.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | external protocol identifier |
command |
string | command to execute |
params |
string | command arguments |
Returns:
result of command execution (plugin dependent)
- Type
- string
(static) setHttpHeaders(headers) → {boolean}
Set HTTP headers that will be inserted into all HTTP and RTSP requests from this player.
Takes effect on next playback.
Example
stbPlayerManager.list[0].setHttpHeaders({
header1: value1,
header2: value2
});
Parameters:
Name | Type | Description |
---|---|---|
headers |
Object.<string, string> | data to send |
Returns:
operation status (false in case of wrong headers data)
- Type
- boolean
Type Definitions
capabilitiesConfig
Properties:
Name | Type | Description |
---|---|---|
video |
boolean | indicates whether player can play video |
audio |
boolean | indicates whether player can play audio |
subtitles |
boolean | indicates whether player can show subtitles |
teletext |
boolean | indicates whether player can show teletext |
3d |
boolean | indicates whether player can play 3D video |
autoFrameRate |
boolean | indicates whether player can affect frame rate |
timeShift |
boolean | indicates whether player can use timeShift |
lowQuality |
boolean | indicates whether player renders in low quality |
Set of flags that represent what player is capable to do at the moment.
Type:
- Object
statisticsConfig
- See:
Properties:
Name | Type | Description |
---|---|---|
continuityErrors |
number | continuity counter error count |
rtpErrors |
number | RTP error count |
decodingErrors |
number | video decoding error count |
Player statistics structure.
Type:
- Object
audioTrackConfig
Properties:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pid |
number | audio track PID |
||||||||||||||||||||
lang |
Array.<string> | ISO 639 language codes |
||||||||||||||||||||
type |
number | audio codec type
|
||||||||||||||||||||
title |
number | some description |
Player audio track structure.
Type:
- Object
Example
{
pid: 114,
lang: ['rus', 'ru'],
type: 3,
title: 'Description'
}
subtitlesTrackConfig
Properties:
Name | Type | Description |
---|---|---|
pid |
number | subtitles track PID |
lang |
Array.<string> | ISO 639 language codes |
Player subtitles track structure.
Type:
- Object
Example
{
pid: 114,
lang: ['rus', 'ru']
}
viewportConfig
- See:
Properties:
Name | Type | Description |
---|---|---|
width |
number | horizontal size of the video window |
height |
number | vertical size of the video window |
x |
number | left upper corner of the video window horizontal offset from the screen edge must not exceed the screen width in sum with |
y |
number | left upper cornet of the video window vertical offset from the screen edge must not exceed the screen width in sum with |
Viewport position and size structure.
All values are in pixels. Properties width
and height
depends on the screen resolution.
Type:
- Object
Example
{
x: 0,
y: 0,
width: 1280,
height: 720
}
clipConfig
Properties:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
width |
number | clip rectangle horizontal size |
||||||
height |
number | clip rectangle vertical size |
||||||
x |
number | clip rectangle horizontal offset related to encoded video |
||||||
y |
number | clip rectangle vertical offset related to encoded video |
||||||
save |
boolean | whether player should save clip region over the sequential playbacks:
|
Clipping rectangle for input video structure.
Clip rectangle specifies which sub-rectangle will be shown in specified video window rectangle (stretched to fill whole video window).
If width
== 0 or height
== 0 then clip will be ignored.
If clip rectangle is ignored or has size equal to encoded video size
then aspect ratio conversion will be performed inside specified video window rectangle
according to the current aspect for fullscreen mode.
This does not depend on specified video window size.
At the same time stbPlayer.SetViewport
function does aspect ratio conversion only in fullscreen mode.
Clip rectangle size and position should be in pixels of the encoded video.
Width and height of encoded video can be retrieved via stbPlayer.videoInfo
(see width
and height
).
Type:
- Object
Example
{
x: 10,
y: 10,
width: 1260,
height: 700,
save: true
}
playConfig
- See:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
solution |
string | media content type Depends on the IPTV-device type (see Media content formats tutorial for the table of supported formats and the description of media content types). |
|
uri |
string | address of the content to be played Depends on the type (see more detailed information in Media content formats tutorial). |
|
position |
number |
<optional> |
time in seconds from which the content should be played |
program |
number |
<optional> |
MPTS program number |
videoPID |
number |
<optional> |
MPTS video track number |
audioPID |
number |
<optional> |
audio track number to play In case audioPID is specified and valid, it's chosen for playback. Otherwise audio track is chosen corresponding to |
subtitlesPID |
number |
<optional> |
subtitles track number to show |
subtitlesFile |
string |
<optional> |
external subtitle file address in the same format as in |
playStr |
string |
<optional> |
single option to combine multiple parameters format: |
proxy |
stbBrowser~proxyConfig |
<optional> |
affects only HTTP playback and valid till the next call of |
Player content playback structure.
Type:
- Object
teletextTracksConfig
Properties:
Name | Type | Description |
---|---|---|
pid |
number | teletext track PID |
lang |
Array.<string> | ISO 639 language codes |
Player teletext track structure.
Type:
- Object
Example
{
pid: 114,
lang: ['rus', 'ru']
}
teletextCharsetConfig
- See:
Teletext and teletext subtitles charset codes table.
Value | Description |
---|---|
-0x01 | Disabled |
0x00 | English |
0x01 | German |
0x02 | Swedish/Finnish/Hungarian |
0x03 | Italian |
0x04 | French |
0x05 | Portuguese/Spanish |
0x06 | Czech/Slovak |
0x08 | Polish |
0x09 | German |
0x0a | Swedish/Finnish/Hungarian |
0x0b | Italian |
0x0c | French |
0x0e | Czech/Slovak |
0x10 | English |
0x11 | German |
0x12 | Swedish/Finnish/Hungarian |
0x13 | Italian |
0x14 | French |
0x15 | Portuguese/Spanish |
0x16 | Turkish |
0x1d | Serbian/Croatian/Slovenian |
0x1f | Rumanian |
0x20 | Serbian/Croatian |
0x21 | German |
0x22 | Estonian |
0x23 | Lettish/Lithuanian |
0x24 | Russian/Bulgarian |
0x25 | Ukrainian |
0x26 | Czech/Slovak |
0x36 | Turkish |
0x37 | Greek |
0x80 | English/Arabic |
0x84 | French/Arabic |
0x87 | Arabic |
0x95 | Hebrew/Arabic |
0x97 | Arabic |
Type:
- number