Skip to content

Latest commit

 

History

History
2590 lines (1961 loc) · 51.8 KB

File metadata and controls

2590 lines (1961 loc) · 51.8 KB

TextTrack Plugin

Version: 1.4.0

A TextTrack plugin for Thunder framework.

Table of Contents

Abbreviation, Acronyms and Terms

[Refer to this link]

Description

The TextTrack plugin provides an interface for TextTrack.

The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [Thunder].

Configuration

The table below lists configuration options of the plugin.

Name Type Description
callsign string Plugin instance name (default: org.rdk.TextTrack)
classname string Class name: TextTrack
locator string Library name: libWPEFrameworkTextTrack.so
autostart boolean Determines if the plugin shall be started automatically along with the framework

Methods

The following methods are provided by the TextTrack plugin:

TextTrack interface methods:

Method Description
closeSession Closes a previously opened render session.
getBackgroundColor Getter for BackgroundColor
getBackgroundOpacity Getter for BackgroundOpacity
getCapabilities Retrieves an iterator over all supported TextTrack capabilities.
getCapability Queries whether a specific TextTrack capability is supported by the implementation.
getClosedCaptionsStyle Gets the current ClosedCaptionsStyle settings.
getFontColor Getter for FontColor
getFontEdge Getter for FontEdge
getFontEdgeColor Getter for FontEdgeColor
getFontFamily Getter for FontFamily
getFontOpacity Getter for FontOpacity
getFontSize Getter for FontSize
getTtmlStyleOverrides Gets the global TTML style overrides
getWindowColor Getter for WindowColor
getWindowOpacity Getter for WindowOpacity
muteSession Mute will hide rendering of Captions
openSession Opens a new renderSession.
pauseSession Pauses a render session.
resetSession Resets a previously opened render session back to its opened state.
resumeSession Resumed a paused session
sendSessionData Sends data of Closed Captions, Captions or Timed Text data to a render session.
sendSessionTimestamp Sends the current timestamp from a media player to a render session.
setBackgroundColor Setter for BackgroundColor
setBackgroundOpacity Setter for BackgroundOpacity
setClosedCaptionsStyle Sets the ClosedCaptionsStyle.
setFontColor Setter for FontColor
setFontEdge Setter for FontEdge
setFontEdgeColor Setter for FontEdgeColor
setFontFamily Setter for FontFamily
setFontOpacity Setter for FontOpacity
setFontSize Setter for FontSize
setPreviewText Sets a static text in the display for preview purposes.
setSessionClosedCaptionsService Sets the render session into CC mode.
setSessionDvbSubtitleSelection Set the render session into Dvb Subtitle mode, specifying the the page for presentation. (See ETSI EN 300 743)
setSessionSCTESelection Set the render session into SCTE mode
setSessionTTMLSelection Set the render session into TTML mode
setSessionTeletextSelection Set the render session into Teletext mode, providing the teletext caption page for presentation
setSessionWebVTTSelection Set the render session into WebVTT mode
setTtmlStyleOverrides Sets global TTML override style.
setWindowColor Setter for WindowColor
setWindowOpacity Setter for WindowOpacity
unMuteSession UnMute will unhide the rendering of Captions.

closeSession

Any created windows and surfaces is destroyed

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 0,
    "method": "org.rdk.TextTrack.closeSession",
    "params": {
        "sessionId": 1
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 0, "method": "org.rdk.TextTrack.closeSession", "params": {"sessionId": 1}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 0,
    "result": null
}

getBackgroundColor

Getter for BackgroundColor

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.color string

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 1,
    "method": "org.rdk.TextTrack.getBackgroundColor"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 1, "method": "org.rdk.TextTrack.getBackgroundColor"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 1,
    "result": {
        "color": ""
    }
}

getBackgroundOpacity

Getter for BackgroundOpacity

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.opacity integer

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 2,
    "method": "org.rdk.TextTrack.getBackgroundOpacity"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 2, "method": "org.rdk.TextTrack.getBackgroundOpacity"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 2,
    "result": {
        "opacity": 0
    }
}

getCapabilities

Retrieves an iterator over all supported TextTrack capabilities.

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.capabilities IIterator Iterator providing the list of supported capabilities. @retval Core::ERROR_NONE The list of capabilities was retrieved successfully. @retval Core::ERROR_NOT_SUPPORTED Retrieving capabilities is not supported.
result.capabilities[#] string

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 3,
    "method": "org.rdk.TextTrack.getCapabilities"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 3, "method": "org.rdk.TextTrack.getCapabilities"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 3,
    "result": [
        "UNSET"
    ]
}

getCapability

Queries whether a specific TextTrack capability is supported by the implementation.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.capability string The capability to query

Results

Name Type Description
result object
result.hasCapability bool Indicates whether the queried capability is supported. @retval Core::ERROR_NONE The capability query completed successfully. @retval Core::ERROR_NOT_SUPPORTED Capability querying is not supported.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 4,
    "method": "org.rdk.TextTrack.getCapability",
    "params": {
        "capability": "FIREBOLT_MIGRATION"
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 4, "method": "org.rdk.TextTrack.getCapability", "params": {"capability": "FIREBOLT_MIGRATION"}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 4,
    "result": {
        "hasCapability": true
    }
}

getClosedCaptionsStyle

Gets the current ClosedCaptionsStyle settings.

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.style ClosedCaptionsStyle Contains the chosen styles
result.style.fontFamily string
result.style.fontSize string
result.style.fontColor string
result.style.fontOpacity integer
result.style.fontEdge string
result.style.fontEdgeColor string
result.style.backgroundColor string
result.style.backgroundOpacity integer
result.style.windowColor string
result.style.windowOpacity integer

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 5,
    "method": "org.rdk.TextTrack.getClosedCaptionsStyle"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 5, "method": "org.rdk.TextTrack.getClosedCaptionsStyle"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 5,
    "result": {
        "fontFamily": "CONTENT_DEFAULT",
        "fontSize": "CONTENT_DEFAULT",
        "fontColor": "",
        "fontOpacity": 0,
        "fontEdge": "CONTENT_DEFAULT",
        "fontEdgeColor": "",
        "backgroundColor": "",
        "backgroundOpacity": 0,
        "windowColor": "",
        "windowOpacity": 0
    }
}

getFontColor

Getter for FontColor

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.color string

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 6,
    "method": "org.rdk.TextTrack.getFontColor"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 6, "method": "org.rdk.TextTrack.getFontColor"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 6,
    "result": {
        "color": ""
    }
}

getFontEdge

Getter for FontEdge

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.edge string

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 7,
    "method": "org.rdk.TextTrack.getFontEdge"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 7, "method": "org.rdk.TextTrack.getFontEdge"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 7,
    "result": {
        "edge": "CONTENT_DEFAULT"
    }
}

getFontEdgeColor

Getter for FontEdgeColor

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.color string

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 8,
    "method": "org.rdk.TextTrack.getFontEdgeColor"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 8, "method": "org.rdk.TextTrack.getFontEdgeColor"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 8,
    "result": {
        "color": ""
    }
}

getFontFamily

Getter for FontFamily

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.font string

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 9,
    "method": "org.rdk.TextTrack.getFontFamily"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 9, "method": "org.rdk.TextTrack.getFontFamily"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 9,
    "result": {
        "font": "CONTENT_DEFAULT"
    }
}

getFontOpacity

Getter for FontOpacity

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.opacity integer

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 10,
    "method": "org.rdk.TextTrack.getFontOpacity"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 10, "method": "org.rdk.TextTrack.getFontOpacity"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 10,
    "result": {
        "opacity": 0
    }
}

getFontSize

Getter for FontSize

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.size string

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 11,
    "method": "org.rdk.TextTrack.getFontSize"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 11, "method": "org.rdk.TextTrack.getFontSize"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 11,
    "result": {
        "size": "CONTENT_DEFAULT"
    }
}

getTtmlStyleOverrides

Gets the global TTML style overrides

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.style string Contains the chosen override for styles

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 12,
    "method": "org.rdk.TextTrack.getTtmlStyleOverrides"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 12, "method": "org.rdk.TextTrack.getTtmlStyleOverrides"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 12,
    "result": {
        "style": ""
    }
}

getWindowColor

Getter for WindowColor

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.color string

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 13,
    "method": "org.rdk.TextTrack.getWindowColor"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 13, "method": "org.rdk.TextTrack.getWindowColor"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 13,
    "result": {
        "color": ""
    }
}

getWindowOpacity

Getter for WindowOpacity

Events

Event details will be updated soon.

Parameters

This method takes no parameters.

Results

Name Type Description
result object
result.opacity integer

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 14,
    "method": "org.rdk.TextTrack.getWindowOpacity"
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 14, "method": "org.rdk.TextTrack.getWindowOpacity"}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 14,
    "result": {
        "opacity": 0
    }
}

muteSession

Mute will hide rendering of Captions

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 15,
    "method": "org.rdk.TextTrack.muteSession",
    "params": {
        "sessionId": 1
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 15, "method": "org.rdk.TextTrack.muteSession", "params": {"sessionId": 1}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 15,
    "result": null
}

openSession

If a session is already running on the supplied displayHandle, the sessionId for this session is returned. If the session is instead newly opened, the session type is not set and display is muted. Use one of the "selection" functions to select a session type, and UnMuteSession() to get subtitles displayed.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.displayHandle string is an encoding of the wayland display name

Results

Name Type Description
result object
result.sessionId integer On success the returned session id

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 16,
    "method": "org.rdk.TextTrack.openSession",
    "params": {
        "displayHandle": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 16, "method": "org.rdk.TextTrack.openSession", "params": {"displayHandle": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 16,
    "result": {
        "sessionId": 1
    }
}

pauseSession

Any text rendered remains on screen and any text due to be rendered soon is held until the render session is resumed.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 17,
    "method": "org.rdk.TextTrack.pauseSession",
    "params": {
        "sessionId": 1
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 17, "method": "org.rdk.TextTrack.pauseSession", "params": {"sessionId": 1}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 17,
    "result": null
}

resetSession

The state will be like after calling OpenSession()

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 18,
    "method": "org.rdk.TextTrack.resetSession",
    "params": {
        "sessionId": 1
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 18, "method": "org.rdk.TextTrack.resetSession", "params": {"sessionId": 1}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 18,
    "result": null
}

resumeSession

Resumed a paused session

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 19,
    "method": "org.rdk.TextTrack.resumeSession",
    "params": {
        "sessionId": 1
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 19, "method": "org.rdk.TextTrack.resumeSession", "params": {"sessionId": 1}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 19,
    "result": null
}

sendSessionData

Sends data of Closed Captions, Captions or Timed Text data to a render session.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id
params.type string Is the type of data
params.displayOffsetMs integer Is currently unused
params.data string Is the data to display, properly formatted as per the expectations of the type used

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 20,
    "method": "org.rdk.TextTrack.sendSessionData",
    "params": {
        "sessionId": 1,
        "type": "PES",
        "displayOffsetMs": 0,
        "data": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 20, "method": "org.rdk.TextTrack.sendSessionData", "params": {"sessionId": 1, "type": "PES", "displayOffsetMs": 0, "data": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 20,
    "result": null
}

sendSessionTimestamp

The STC is used in some forms of text rendering to compare against the text data PTS to determine its presentation time.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id
params.mediaTimestampMs integer Is a timestamp

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 21,
    "method": "org.rdk.TextTrack.sendSessionTimestamp",
    "params": {
        "sessionId": 1,
        "mediaTimestampMs": 0
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 21, "method": "org.rdk.TextTrack.sendSessionTimestamp", "params": {"sessionId": 1, "mediaTimestampMs": 0}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 21,
    "result": null
}

setBackgroundColor

Setter for BackgroundColor

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.color string

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 22,
    "method": "org.rdk.TextTrack.setBackgroundColor",
    "params": {
        "color": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 22, "method": "org.rdk.TextTrack.setBackgroundColor", "params": {"color": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 22,
    "result": null
}

setBackgroundOpacity

Setter for BackgroundOpacity

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.opacity integer

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 23,
    "method": "org.rdk.TextTrack.setBackgroundOpacity",
    "params": {
        "opacity": 0
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 23, "method": "org.rdk.TextTrack.setBackgroundOpacity", "params": {"opacity": 0}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 23,
    "result": null
}

setClosedCaptionsStyle

For all values it is possible to keep or override the stream default. The style setting will take effect immediately in all running (Closed Captions) sessions, which has not applied a custom style.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.style ClosedCaptionsStyle Contains the chosen styles
params.style.fontFamily string
params.style.fontSize string
params.style.fontColor string
params.style.fontOpacity integer
params.style.fontEdge string
params.style.fontEdgeColor string
params.style.backgroundColor string
params.style.backgroundOpacity integer
params.style.windowColor string
params.style.windowOpacity integer

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 24,
    "method": "org.rdk.TextTrack.setClosedCaptionsStyle",
    "params": {
        "fontFamily": "CONTENT_DEFAULT",
        "fontSize": "CONTENT_DEFAULT",
        "fontColor": "",
        "fontOpacity": 0,
        "fontEdge": "CONTENT_DEFAULT",
        "fontEdgeColor": "",
        "backgroundColor": "",
        "backgroundOpacity": 0,
        "windowColor": "",
        "windowOpacity": 0
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 24, "method": "org.rdk.TextTrack.setClosedCaptionsStyle", "params": {"fontFamily": "CONTENT_DEFAULT", "fontSize": "CONTENT_DEFAULT", "fontColor": "", "fontOpacity": 0, "fontEdge": "CONTENT_DEFAULT", "fontEdgeColor": "", "backgroundColor": "", "backgroundOpacity": 0, "windowColor": "", "windowOpacity": 0}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 24,
    "result": null
}

setFontColor

Setter for FontColor

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.color string

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 25,
    "method": "org.rdk.TextTrack.setFontColor",
    "params": {
        "color": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 25, "method": "org.rdk.TextTrack.setFontColor", "params": {"color": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 25,
    "result": null
}

setFontEdge

Setter for FontEdge

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.edge string

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 26,
    "method": "org.rdk.TextTrack.setFontEdge",
    "params": {
        "edge": "CONTENT_DEFAULT"
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 26, "method": "org.rdk.TextTrack.setFontEdge", "params": {"edge": "CONTENT_DEFAULT"}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 26,
    "result": null
}

setFontEdgeColor

Setter for FontEdgeColor

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.color string

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 27,
    "method": "org.rdk.TextTrack.setFontEdgeColor",
    "params": {
        "color": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 27, "method": "org.rdk.TextTrack.setFontEdgeColor", "params": {"color": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 27,
    "result": null
}

setFontFamily

Setter for FontFamily

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.font string

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 28,
    "method": "org.rdk.TextTrack.setFontFamily",
    "params": {
        "font": "CONTENT_DEFAULT"
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 28, "method": "org.rdk.TextTrack.setFontFamily", "params": {"font": "CONTENT_DEFAULT"}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 28,
    "result": null
}

setFontOpacity

Setter for FontOpacity

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.opacity integer

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 29,
    "method": "org.rdk.TextTrack.setFontOpacity",
    "params": {
        "opacity": 0
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 29, "method": "org.rdk.TextTrack.setFontOpacity", "params": {"opacity": 0}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 29,
    "result": null
}

setFontSize

Setter for FontSize

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.size string

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 30,
    "method": "org.rdk.TextTrack.setFontSize",
    "params": {
        "size": "CONTENT_DEFAULT"
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 30, "method": "org.rdk.TextTrack.setFontSize", "params": {"size": "CONTENT_DEFAULT"}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 30,
    "result": null
}

setPreviewText

The session must be opened as usual and a type chosen. The text will only be shown if the type of session supports preview.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id
params.text string Is the text to display

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 31,
    "method": "org.rdk.TextTrack.setPreviewText",
    "params": {
        "sessionId": 1,
        "text": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 31, "method": "org.rdk.TextTrack.setPreviewText", "params": {"sessionId": 1, "text": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 31,
    "result": null
}

setSessionClosedCaptionsService

Selecting the specified CC service to decode and display in the specified render session. This should be done before starting the injection of data. Valid input for service is "CC[1-4]", "TEXT[1-4]", "SERVICE[1-64]"

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id
params.service string Identifies the service to display

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 32,
    "method": "org.rdk.TextTrack.setSessionClosedCaptionsService",
    "params": {
        "sessionId": 1,
        "service": "CC3"
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 32, "method": "org.rdk.TextTrack.setSessionClosedCaptionsService", "params": {"sessionId": 1, "service": "CC3"}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 32,
    "result": null
}

setSessionDvbSubtitleSelection

Set the render session into Dvb Subtitle mode, specifying the the page for presentation. (See ETSI EN 300 743)

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id
params.compositionPageId integer Is the one Id
params.ancillaryPageId integer Is the other Id

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 33,
    "method": "org.rdk.TextTrack.setSessionDvbSubtitleSelection",
    "params": {
        "sessionId": 1,
        "compositionPageId": 0,
        "ancillaryPageId": 0
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 33, "method": "org.rdk.TextTrack.setSessionDvbSubtitleSelection", "params": {"sessionId": 1, "compositionPageId": 0, "ancillaryPageId": 0}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 33,
    "result": null
}

setSessionSCTESelection

Set the render session into SCTE mode

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 34,
    "method": "org.rdk.TextTrack.setSessionSCTESelection",
    "params": {
        "sessionId": 1
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 34, "method": "org.rdk.TextTrack.setSessionSCTESelection", "params": {"sessionId": 1}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 34,
    "result": null
}

setSessionTTMLSelection

Set the render session into TTML mode

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 35,
    "method": "org.rdk.TextTrack.setSessionTTMLSelection",
    "params": {
        "sessionId": 1
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 35, "method": "org.rdk.TextTrack.setSessionTTMLSelection", "params": {"sessionId": 1}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 35,
    "result": null
}

setSessionTeletextSelection

Set the render session into Teletext mode, providing the teletext caption page for presentation

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id
params.page integer The user selected teletext caption page 100-899

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 36,
    "method": "org.rdk.TextTrack.setSessionTeletextSelection",
    "params": {
        "sessionId": 1,
        "page": 0
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 36, "method": "org.rdk.TextTrack.setSessionTeletextSelection", "params": {"sessionId": 1, "page": 0}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 36,
    "result": null
}

setSessionWebVTTSelection

Set the render session into WebVTT mode

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 37,
    "method": "org.rdk.TextTrack.setSessionWebVTTSelection",
    "params": {
        "sessionId": 1
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 37, "method": "org.rdk.TextTrack.setSessionWebVTTSelection", "params": {"sessionId": 1}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 37,
    "result": null
}

setTtmlStyleOverrides

The styles given here (as "attr:value;attr:value") will be applied last to TTML sessions, meaning that they will override styles given in the content. The value will be persisted in the system. The style setting will take effect immediately in all running (TTML) sessions, which has not applied a custom style.

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.style string Contains the chosen override for styles

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 38,
    "method": "org.rdk.TextTrack.setTtmlStyleOverrides",
    "params": {
        "style": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 38, "method": "org.rdk.TextTrack.setTtmlStyleOverrides", "params": {"style": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 38,
    "result": null
}

setWindowColor

Setter for WindowColor

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.color string

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 39,
    "method": "org.rdk.TextTrack.setWindowColor",
    "params": {
        "color": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 39, "method": "org.rdk.TextTrack.setWindowColor", "params": {"color": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 39,
    "result": null
}

setWindowOpacity

Setter for WindowOpacity

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.opacity integer

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 40,
    "method": "org.rdk.TextTrack.setWindowOpacity",
    "params": {
        "opacity": 0
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 40, "method": "org.rdk.TextTrack.setWindowOpacity", "params": {"opacity": 0}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 40,
    "result": null
}

unMuteSession

A newly created session is muted and should be unmuted to me visible

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.sessionId integer On success the returned session id

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 41,
    "method": "org.rdk.TextTrack.unMuteSession",
    "params": {
        "sessionId": 1
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 41, "method": "org.rdk.TextTrack.unMuteSession", "params": {"sessionId": 1}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 41,
    "result": null
}

Notifications

Notifications are autonomous events, triggered by the internals of the implementation, and broadcasted via JSON-RPC to all registered observers. Refer to [Thunder] for information on how to register for a notification.

The following events are provided by the TextTrack plugin:

TextTrack interface events:

Event Description
onBackgroundColorChanged Notify backgroundColor Changed
onBackgroundOpacityChanged Notify backgroundOpacity Changed
onClosedCaptionsStyleChanged The ClosedCaptionsStyle settings has changed. Call GetClosedCaptionsStyle() to get the new settings.
onFontColorChanged Notify fontColor Changed
onFontEdgeChanged Notify fontEdge Changed
onFontEdgeColorChanged Notify fontEdgeColor Changed
onFontFamilyChanged Notify fontFamily Changed
onFontOpacityChanged Notify fontOpacity Changed
onFontSizeChanged Notify fontSize Changed
onTtmlStyleOverridesChanged The TTML Style override settings has changed.
onWindowColorChanged Notify windowColor Changed
onWindowOpacityChanged Notify windowOpacity Changed

onBackgroundColorChanged

Notify backgroundColor Changed

Parameters

Name Type Description
params object
params.color string

Examples

{
    "jsonrpc": 2.0,
    "id": 42,
    "method": "org.rdk.TextTrack.onBackgroundColorChanged",
    "params": {
        "color": ""
    }
}

onBackgroundOpacityChanged

Notify backgroundOpacity Changed

Parameters

Name Type Description
params object
params.opacity integer

Examples

{
    "jsonrpc": 2.0,
    "id": 43,
    "method": "org.rdk.TextTrack.onBackgroundOpacityChanged",
    "params": {
        "opacity": 0
    }
}

onClosedCaptionsStyleChanged

The ClosedCaptionsStyle settings has changed. Call GetClosedCaptionsStyle() to get the new settings.

Parameters

Name Type Description
params object
params.style ClosedCaptionsStyle Contains the chosen styles
params.style.fontFamily string
params.style.fontSize string
params.style.fontColor string
params.style.fontOpacity integer
params.style.fontEdge string
params.style.fontEdgeColor string
params.style.backgroundColor string
params.style.backgroundOpacity integer
params.style.windowColor string
params.style.windowOpacity integer

Examples

{
    "jsonrpc": 2.0,
    "id": 44,
    "method": "org.rdk.TextTrack.onClosedCaptionsStyleChanged",
    "params": {
        "fontFamily": "CONTENT_DEFAULT",
        "fontSize": "CONTENT_DEFAULT",
        "fontColor": "",
        "fontOpacity": 0,
        "fontEdge": "CONTENT_DEFAULT",
        "fontEdgeColor": "",
        "backgroundColor": "",
        "backgroundOpacity": 0,
        "windowColor": "",
        "windowOpacity": 0
    }
}

onFontColorChanged

Notify fontColor Changed

Parameters

Name Type Description
params object
params.color string

Examples

{
    "jsonrpc": 2.0,
    "id": 45,
    "method": "org.rdk.TextTrack.onFontColorChanged",
    "params": {
        "color": ""
    }
}

onFontEdgeChanged

Notify fontEdge Changed

Parameters

Name Type Description
params object
params.edge string

Examples

{
    "jsonrpc": 2.0,
    "id": 46,
    "method": "org.rdk.TextTrack.onFontEdgeChanged",
    "params": {
        "edge": "CONTENT_DEFAULT"
    }
}

onFontEdgeColorChanged

Notify fontEdgeColor Changed

Parameters

Name Type Description
params object
params.color string

Examples

{
    "jsonrpc": 2.0,
    "id": 47,
    "method": "org.rdk.TextTrack.onFontEdgeColorChanged",
    "params": {
        "color": ""
    }
}

onFontFamilyChanged

Notify fontFamily Changed

Parameters

Name Type Description
params object
params.font string

Examples

{
    "jsonrpc": 2.0,
    "id": 48,
    "method": "org.rdk.TextTrack.onFontFamilyChanged",
    "params": {
        "font": "CONTENT_DEFAULT"
    }
}

onFontOpacityChanged

Notify fontOpacity Changed

Parameters

Name Type Description
params object
params.opacity integer

Examples

{
    "jsonrpc": 2.0,
    "id": 49,
    "method": "org.rdk.TextTrack.onFontOpacityChanged",
    "params": {
        "opacity": 0
    }
}

onFontSizeChanged

Notify fontSize Changed

Parameters

Name Type Description
params object
params.size string

Examples

{
    "jsonrpc": 2.0,
    "id": 50,
    "method": "org.rdk.TextTrack.onFontSizeChanged",
    "params": {
        "size": "CONTENT_DEFAULT"
    }
}

onTtmlStyleOverridesChanged

The TTML Style override settings has changed.

Parameters

Name Type Description
params object
params.style string Contains the chosen override for styles

Examples

{
    "jsonrpc": 2.0,
    "id": 51,
    "method": "org.rdk.TextTrack.onTtmlStyleOverridesChanged",
    "params": {
        "style": ""
    }
}

onWindowColorChanged

Notify windowColor Changed

Parameters

Name Type Description
params object
params.color string

Examples

{
    "jsonrpc": 2.0,
    "id": 52,
    "method": "org.rdk.TextTrack.onWindowColorChanged",
    "params": {
        "color": ""
    }
}

onWindowOpacityChanged

Notify windowOpacity Changed

Parameters

Name Type Description
params object
params.opacity integer

Examples

{
    "jsonrpc": 2.0,
    "id": 53,
    "method": "org.rdk.TextTrack.onWindowOpacityChanged",
    "params": {
        "opacity": 0
    }
}