@roku-sdk/components 0.0.0-stage → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BREAKING_CHANGES.md +84 -0
- package/LICENSE +21 -0
- package/README.md +19 -2
- package/core-jsx.d.ts +53 -0
- package/eslint.config.mjs +3 -0
- package/jsx.d.ts +273 -0
- package/package.json +84 -3
- package/src/__tests__/container.test.tsx +150 -0
- package/src/__tests__/glyphs.test.ts +202 -0
- package/src/__tests__/modal-boundary-export.test.ts +12 -0
- package/src/__tests__/native-modal.test.tsx +224 -0
- package/src/__tests__/tween-release.test.tsx +125 -0
- package/src/__tests__/tween-stops-shape.test.tsx +165 -0
- package/src/__tests__/tween-without-compat.test.tsx +64 -0
- package/src/__tests__/tween.test.tsx +195 -0
- package/src/blended-busy-spinner.props.ts +37 -0
- package/src/blended-busy-spinner.tsx +13 -0
- package/src/bounding-tracker.props.ts +18 -0
- package/src/bounding-tracker.tsx +13 -0
- package/src/button-row.tsx +126 -0
- package/src/channel-store.props.ts +425 -0
- package/src/channel-store.tsx +76 -0
- package/src/container.tsx +130 -0
- package/src/core/jsx-runtime.ts +39 -0
- package/src/focusable-group.props.ts +8 -0
- package/src/focusable-group.tsx +17 -0
- package/src/focusable.props.ts +14 -0
- package/src/focusable.tsx +17 -0
- package/src/glyphs.ts +116 -0
- package/src/helpers/index.tsx +4 -0
- package/src/helpers/resolution-context.tsx +68 -0
- package/src/helpers/scale-for-device-resolution.ts +31 -0
- package/src/index.tsx +70 -0
- package/src/jsx-props.ts +87 -0
- package/src/kdfs.d.ts +14 -0
- package/src/kdfs.ts +15 -0
- package/src/key-handler.props.ts +33 -0
- package/src/key-handler.tsx +24 -0
- package/src/modal-dialog.props.ts +38 -0
- package/src/modal-dialog.tsx +41 -0
- package/src/retain-asset.ts +24 -0
- package/src/sg-intrinsics.json +1153 -0
- package/src/sg-nodes/__tests__/__snapshots__/font.test.tsx.snap +13 -0
- package/src/sg-nodes/__tests__/__snapshots__/prop-forwarding.test.tsx.snap +4409 -0
- package/src/sg-nodes/__tests__/core-props.test.ts +301 -0
- package/src/sg-nodes/__tests__/font.test.tsx +141 -0
- package/src/sg-nodes/__tests__/imperative-methods.test.ts +268 -0
- package/src/sg-nodes/__tests__/prop-forwarding.test.tsx +1049 -0
- package/src/sg-nodes/__tests__/solid-integration.test.tsx +719 -0
- package/src/sg-nodes/animated-image.props.ts +64 -0
- package/src/sg-nodes/animated-image.tsx +23 -0
- package/src/sg-nodes/animation.props.ts +292 -0
- package/src/sg-nodes/animation.tsx +190 -0
- package/src/sg-nodes/array-grid.ts +602 -0
- package/src/sg-nodes/audio.props.ts +302 -0
- package/src/sg-nodes/audio.tsx +57 -0
- package/src/sg-nodes/busy-spinner.props.ts +59 -0
- package/src/sg-nodes/busy-spinner.tsx +84 -0
- package/src/sg-nodes/button-group.props.ts +141 -0
- package/src/sg-nodes/button-group.tsx +30 -0
- package/src/sg-nodes/button.props.ts +119 -0
- package/src/sg-nodes/button.tsx +31 -0
- package/src/sg-nodes/check-list.props.ts +71 -0
- package/src/sg-nodes/check-list.tsx +55 -0
- package/src/sg-nodes/content-node.props.ts +1316 -0
- package/src/sg-nodes/content-node.tsx +153 -0
- package/src/sg-nodes/core-props.ts +197 -0
- package/src/sg-nodes/custom-keyboard.props.ts +108 -0
- package/src/sg-nodes/custom-keyboard.tsx +48 -0
- package/src/sg-nodes/dialog.props.ts +159 -0
- package/src/sg-nodes/dialog.tsx +36 -0
- package/src/sg-nodes/dynamic-key-grid.props.ts +22 -0
- package/src/sg-nodes/dynamic-key-grid.tsx +16 -0
- package/src/sg-nodes/dynamic-keyboard.props.ts +30 -0
- package/src/sg-nodes/dynamic-keyboard.tsx +18 -0
- package/src/sg-nodes/dynamic-mini-keyboard.props.ts +22 -0
- package/src/sg-nodes/dynamic-mini-keyboard.tsx +18 -0
- package/src/sg-nodes/dynamic-pinpad.props.ts +57 -0
- package/src/sg-nodes/dynamic-pinpad.tsx +18 -0
- package/src/sg-nodes/effect.props.ts +116 -0
- package/src/sg-nodes/effect.tsx +39 -0
- package/src/sg-nodes/font.props.ts +45 -0
- package/src/sg-nodes/font.tsx +80 -0
- package/src/sg-nodes/group.props.ts +105 -0
- package/src/sg-nodes/group.tsx +30 -0
- package/src/sg-nodes/label-list.props.ts +86 -0
- package/src/sg-nodes/label-list.tsx +64 -0
- package/src/sg-nodes/label.props.ts +207 -0
- package/src/sg-nodes/label.tsx +56 -0
- package/src/sg-nodes/layout-group.props.ts +69 -0
- package/src/sg-nodes/layout-group.tsx +75 -0
- package/src/sg-nodes/list-panel.props.ts +104 -0
- package/src/sg-nodes/list-panel.tsx +49 -0
- package/src/sg-nodes/markup-grid.props.ts +78 -0
- package/src/sg-nodes/markup-grid.tsx +38 -0
- package/src/sg-nodes/markup-list.props.ts +68 -0
- package/src/sg-nodes/markup-list.tsx +38 -0
- package/src/sg-nodes/mask-group.props.ts +78 -0
- package/src/sg-nodes/mask-group.tsx +59 -0
- package/src/sg-nodes/media-playback-methods.ts +20 -0
- package/src/sg-nodes/node.ts +77 -0
- package/src/sg-nodes/overhang.props.ts +169 -0
- package/src/sg-nodes/overhang.tsx +29 -0
- package/src/sg-nodes/panel-set.props.ts +71 -0
- package/src/sg-nodes/panel-set.tsx +53 -0
- package/src/sg-nodes/panel.props.ts +176 -0
- package/src/sg-nodes/panel.tsx +56 -0
- package/src/sg-nodes/poster-grid.props.ts +277 -0
- package/src/sg-nodes/poster-grid.tsx +45 -0
- package/src/sg-nodes/poster.props.ts +125 -0
- package/src/sg-nodes/poster.tsx +44 -0
- package/src/sg-nodes/radio-button-list.props.ts +59 -0
- package/src/sg-nodes/radio-button-list.tsx +68 -0
- package/src/sg-nodes/rectangle.props.ts +29 -0
- package/src/sg-nodes/rectangle.tsx +27 -0
- package/src/sg-nodes/row-list.props.ts +288 -0
- package/src/sg-nodes/row-list.tsx +47 -0
- package/src/sg-nodes/scene.props.ts +65 -0
- package/src/sg-nodes/scene.tsx +15 -0
- package/src/sg-nodes/scrollable-text.props.ts +133 -0
- package/src/sg-nodes/scrollable-text.tsx +64 -0
- package/src/sg-nodes/scrolling-label.props.ts +106 -0
- package/src/sg-nodes/scrolling-label.tsx +42 -0
- package/src/sg-nodes/simple-label.props.ts +156 -0
- package/src/sg-nodes/simple-label.tsx +59 -0
- package/src/sg-nodes/sound-effect.props.ts +130 -0
- package/src/sg-nodes/sound-effect.tsx +65 -0
- package/src/sg-nodes/standard-dialog.props.ts +520 -0
- package/src/sg-nodes/standard-dialog.tsx +428 -0
- package/src/sg-nodes/standard-keyboard-dialog.props.ts +84 -0
- package/src/sg-nodes/standard-keyboard-dialog.tsx +59 -0
- package/src/sg-nodes/standard-message-dialog.props.ts +56 -0
- package/src/sg-nodes/standard-message-dialog.tsx +48 -0
- package/src/sg-nodes/standard-pinpad-dialog.props.ts +64 -0
- package/src/sg-nodes/standard-pinpad-dialog.tsx +46 -0
- package/src/sg-nodes/standard-progress-dialog.props.ts +30 -0
- package/src/sg-nodes/standard-progress-dialog.tsx +43 -0
- package/src/sg-nodes/target-group.props.ts +278 -0
- package/src/sg-nodes/target-group.tsx +63 -0
- package/src/sg-nodes/target-list.props.ts +128 -0
- package/src/sg-nodes/target-list.tsx +66 -0
- package/src/sg-nodes/target-set.props.ts +63 -0
- package/src/sg-nodes/target-set.tsx +42 -0
- package/src/sg-nodes/time-grid.props.ts +646 -0
- package/src/sg-nodes/time-grid.tsx +87 -0
- package/src/sg-nodes/tween.props.ts +115 -0
- package/src/sg-nodes/types.ts +150 -0
- package/src/sg-nodes/video.props.ts +573 -0
- package/src/sg-nodes/video.tsx +73 -0
- package/src/sg-nodes/voice-text-edit-box.props.ts +91 -0
- package/src/sg-nodes/voice-text-edit-box.tsx +15 -0
- package/src/sg-nodes/zoom-row-list.props.ts +416 -0
- package/src/sg-nodes/zoom-row-list.tsx +42 -0
- package/src/standard-dialog-next/__tests__/standard-dialog-next.test.tsx +186 -0
- package/src/standard-dialog-next/index.ts +5 -0
- package/src/standard-dialog-next/standard-dialog-next.props.ts +80 -0
- package/src/standard-dialog-next/standard-dialog-next.tsx +326 -0
- package/src/test-helpers/tween-test-setup.ts +78 -0
- package/src/tween.tsx +173 -0
- package/src/types.ts +8 -0
- package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.brs +13 -0
- package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.xml +10 -0
- package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.xml.d.ts +42 -0
- package/src/xml-components/bounding-tracker/BoundingTracker.brs +26 -0
- package/src/xml-components/bounding-tracker/BoundingTracker.xml +14 -0
- package/src/xml-components/bounding-tracker/BoundingTracker.xml.d.ts +42 -0
- package/src/xml-components/channel-store/channelStoreExt.brs +159 -0
- package/src/xml-components/channel-store/channelStoreExt.xml +29 -0
- package/src/xml-components/channel-store/channelStoreExt.xml.d.ts +57 -0
- package/src/xml-components/focus/focusable-group.brs +251 -0
- package/src/xml-components/focus/focusable-group.xml +15 -0
- package/src/xml-components/focus/focusable-group.xml.d.ts +42 -0
- package/src/xml-components/focus/focusable.xml +18 -0
- package/src/xml-components/focus/focusable.xml.d.ts +48 -0
- package/src/xml-components/keyboards/CustomAddressKDF.keyboard.json +547 -0
- package/src/xml-components/keyboards/CustomKeyboard.brs +322 -0
- package/src/xml-components/keyboards/CustomKeyboard.xml +45 -0
- package/src/xml-components/keyboards/CustomKeyboard.xml.d.ts +73 -0
- package/src/xml-components/keyboards/KeyGridExt.xml +4 -0
- package/src/xml-components/keyboards/KeyGridExt.xml.d.ts +37 -0
- package/src/xml-components/keyboards/KeyboardExt.xml +4 -0
- package/src/xml-components/keyboards/KeyboardExt.xml.d.ts +37 -0
- package/src/xml-components/keyboards/MOPPinPadCustomKDF.keyboard.json +151 -0
- package/src/xml-components/keyboards/MiniKeyboardExt.xml +4 -0
- package/src/xml-components/keyboards/MiniKeyboardExt.xml.d.ts +37 -0
- package/src/xml-components/keyboards/PhonePadCustomKDF.keyboard.json +42 -0
- package/src/xml-components/keyboards/PinPadExt.brs +102 -0
- package/src/xml-components/keyboards/PinPadExt.xml +17 -0
- package/src/xml-components/keyboards/PinPadExt.xml.d.ts +49 -0
- package/src/xml-components/keyboards/WifiCustomKDF.keyboard.json +1242 -0
- package/src/xml-components/keyhandler/KeyHandler.brs +30 -0
- package/src/xml-components/keyhandler/KeyHandler.xml +16 -0
- package/src/xml-components/keyhandler/KeyHandler.xml.d.ts +45 -0
- package/src/xml-components/managed-list-panel/ManagedListPanel.brs +137 -0
- package/src/xml-components/managed-list-panel/ManagedListPanel.xml +10 -0
- package/src/xml-components/managed-list-panel/ManagedListPanel.xml.d.ts +37 -0
- package/src/xml-components/modal/Modal.brs +105 -0
- package/src/xml-components/modal/Modal.xml +22 -0
- package/src/xml-components/modal/Modal.xml.d.ts +54 -0
- package/src/xml-components/modal/StandardDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardKeyboardDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardKeyboardDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardMessageDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardMessageDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardPinPadDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardPinPadDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardProgressDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardProgressDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/tests/Modal.test.brs +195 -0
- package/tsconfig.json +10 -0
|
@@ -0,0 +1,1316 @@
|
|
|
1
|
+
// Copyright (c) 2026 Roku, Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import type { INodeProps } from "./node";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Content type values that affect how the title is displayed on screen.
|
|
8
|
+
*
|
|
9
|
+
* The return value on the Roku platform is of type `number`, but the value is set as a string.
|
|
10
|
+
*/
|
|
11
|
+
export enum ContentType {
|
|
12
|
+
/** Movie content. */
|
|
13
|
+
Movie = "movie",
|
|
14
|
+
/** TV series content. */
|
|
15
|
+
Series = "series",
|
|
16
|
+
/** Season of a TV series. */
|
|
17
|
+
Season = "season",
|
|
18
|
+
/** Episode of a TV series. */
|
|
19
|
+
Episode = "episode",
|
|
20
|
+
/** Audio-only content. */
|
|
21
|
+
Audio = "audio"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* MPAA or TV rating values displayed as icon artwork at runtime.
|
|
26
|
+
*
|
|
27
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#rating-attribute-icons}
|
|
28
|
+
*/
|
|
29
|
+
export enum Rating {
|
|
30
|
+
G = "G",
|
|
31
|
+
NC17 = "NC-17",
|
|
32
|
+
PG = "PG",
|
|
33
|
+
PG13 = "PG-13",
|
|
34
|
+
R = "R",
|
|
35
|
+
UR = "UR",
|
|
36
|
+
Unrated = "UNRATED",
|
|
37
|
+
NR = "NR",
|
|
38
|
+
TVY = "TV-Y",
|
|
39
|
+
TVY7 = "TV-Y7",
|
|
40
|
+
TVY7FV = "TV-Y7-FV",
|
|
41
|
+
TVG = "TV-G",
|
|
42
|
+
TVPG = "TV-PG",
|
|
43
|
+
TV14 = "TV-14",
|
|
44
|
+
TVMA = "TV-MA"
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Stream format identifiers for content playback. */
|
|
48
|
+
export enum StreamFormat {
|
|
49
|
+
/** MP4 container format. Also accepts `.mov` and `.m4v` files. */
|
|
50
|
+
Mp4 = "mp4",
|
|
51
|
+
/** HTTP Live Streaming. */
|
|
52
|
+
Hls = "hls",
|
|
53
|
+
/** Smooth Streaming. */
|
|
54
|
+
Ism = "ism",
|
|
55
|
+
/** MPEG-DASH. */
|
|
56
|
+
Dash = "dash",
|
|
57
|
+
/** Matroska Video. */
|
|
58
|
+
Mkv = "mkv",
|
|
59
|
+
/** Matroska Audio. */
|
|
60
|
+
Mka = "mka",
|
|
61
|
+
/** Matroska Subtitles. */
|
|
62
|
+
Mks = "mks",
|
|
63
|
+
/** MP3 audio. */
|
|
64
|
+
Mp3 = "mp3"
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Live bounds pause behavior for live streams. */
|
|
68
|
+
export enum LiveBoundsPauseBehavior {
|
|
69
|
+
/** Default behavior — resumes playback. */
|
|
70
|
+
Resume = "resume",
|
|
71
|
+
/** Stops playback. */
|
|
72
|
+
Stop = "stop",
|
|
73
|
+
/** Keeps stream paused even in the earliest part of the buffer. */
|
|
74
|
+
Pause = "pause"
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Stream quality indicator. */
|
|
78
|
+
export enum StreamQuality {
|
|
79
|
+
/** Standard definition. */
|
|
80
|
+
SD = "SD",
|
|
81
|
+
/** High definition. */
|
|
82
|
+
HD = "HD"
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** Preferred audio codec for playback. */
|
|
86
|
+
export enum PreferredAudioCodec {
|
|
87
|
+
/** Advanced Audio Coding. */
|
|
88
|
+
AAC = "aac",
|
|
89
|
+
/** Dolby Digital (AC-3). */
|
|
90
|
+
AC3 = "ac3",
|
|
91
|
+
/** Dolby Digital Plus (Enhanced AC-3). */
|
|
92
|
+
EAC3 = "eac3"
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** PlayReady DRM encoding type. */
|
|
96
|
+
export enum PlayReadyEncodingType {
|
|
97
|
+
/** PlayReady license acquisition URL. */
|
|
98
|
+
LicenseAcquisitionUrl = "PlayReadyLicenseAcquisitionUrl",
|
|
99
|
+
/** PlayReady license acquisition URL plus additional custom request data. */
|
|
100
|
+
LicenseAcquisitionAndChallenge = "PlayReadyLicenseAcquisitionAndChallenge"
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** DRM key system identifier. */
|
|
104
|
+
export enum DrmKeySystem {
|
|
105
|
+
/** Microsoft PlayReady DRM. */
|
|
106
|
+
PlayReady = "playready",
|
|
107
|
+
/** Google Widevine DRM. */
|
|
108
|
+
Widevine = "widevine"
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* DRM license request template type.
|
|
113
|
+
*
|
|
114
|
+
* @since Roku OS 14.6
|
|
115
|
+
*/
|
|
116
|
+
export enum DrmTemplateType {
|
|
117
|
+
/** License request template is in JSON format. */
|
|
118
|
+
JSON = "JSON",
|
|
119
|
+
/** License request template is in XML format. */
|
|
120
|
+
XML = "XML",
|
|
121
|
+
/** Base64-encodes the challenge and sends it in POST body. Does not use `licReqTemplate`. */
|
|
122
|
+
BASE64 = "BASE64"
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Content classifier values that map to sound and picture modes on Roku TVs.
|
|
127
|
+
*
|
|
128
|
+
* | Value | Sound Mode | Picture Mode |
|
|
129
|
+
* |---------------|------------|-------------|
|
|
130
|
+
* | `"action"` | Movie | Movie |
|
|
131
|
+
* | `"sports"` | Standard | Sports |
|
|
132
|
+
* | `"comedy"` | Movie | Movie |
|
|
133
|
+
* | `"drama"` | Movie | Movie |
|
|
134
|
+
* | `"music"` | Music | Standard |
|
|
135
|
+
* | `"music:lyrics"` | Music | Low Power |
|
|
136
|
+
* | `"news"` | Dialog | Vivid |
|
|
137
|
+
* | `"podcast"` | Dialog | Low Power |
|
|
138
|
+
* | `"animated"` | Movie | Vivid |
|
|
139
|
+
* | `"black+white"` | Movie | Standard |
|
|
140
|
+
* | `"nature"` | Standard | Vivid |
|
|
141
|
+
* | `"reality"` | Standard | Standard |
|
|
142
|
+
*/
|
|
143
|
+
export enum ContentClassifier {
|
|
144
|
+
/** Action genre. Sound: Movie, Picture: Movie. */
|
|
145
|
+
Action = "action",
|
|
146
|
+
/** Animated content. Sound: Movie, Picture: Vivid. */
|
|
147
|
+
Animated = "animated",
|
|
148
|
+
/** Black and white content. Sound: Movie, Picture: Standard. */
|
|
149
|
+
BlackWhite = "black+white",
|
|
150
|
+
/** Comedy genre. Sound: Movie, Picture: Movie. */
|
|
151
|
+
Comedy = "comedy",
|
|
152
|
+
/** Drama genre. Sound: Movie, Picture: Movie. */
|
|
153
|
+
Drama = "drama",
|
|
154
|
+
/** Music content. Sound: Music, Picture: Standard. */
|
|
155
|
+
Music = "music",
|
|
156
|
+
/** Music with lyrics. Sound: Music, Picture: Low Power. */
|
|
157
|
+
MusicLyrics = "music:lyrics",
|
|
158
|
+
/** Nature content. Sound: Standard, Picture: Vivid. */
|
|
159
|
+
Nature = "nature",
|
|
160
|
+
/** News content. Sound: Dialog, Picture: Vivid. */
|
|
161
|
+
News = "news",
|
|
162
|
+
/** Podcast (audio only). Sound: Dialog, Picture: Low Power. */
|
|
163
|
+
Podcast = "podcast",
|
|
164
|
+
/** Reality content. Sound: Standard, Picture: Standard. */
|
|
165
|
+
Reality = "reality",
|
|
166
|
+
/** Sports content. Sound: Standard, Picture: Sports. */
|
|
167
|
+
Sports = "sports"
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Descriptive metadata attributes for content items.
|
|
172
|
+
*
|
|
173
|
+
* These attributes describe the content item to the user in UI elements that allow
|
|
174
|
+
* the user to select the item — such as titles, descriptions, artwork, ratings, and credits.
|
|
175
|
+
*
|
|
176
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#descriptive-attributes}
|
|
177
|
+
*/
|
|
178
|
+
export interface IDescriptiveAttributes {
|
|
179
|
+
/**
|
|
180
|
+
* Content type identifier. Although ContentType accepts a string, the return value on
|
|
181
|
+
* the Roku platform is of type `number`.
|
|
182
|
+
*
|
|
183
|
+
* | Content Type | Return Value |
|
|
184
|
+
* |------------------------|--------------|
|
|
185
|
+
* | movie | 1 |
|
|
186
|
+
* | series | 2 |
|
|
187
|
+
* | season | 3 |
|
|
188
|
+
* | episode | 4 |
|
|
189
|
+
* | audio | 5 |
|
|
190
|
+
* | not set or unsupported | 0 |
|
|
191
|
+
*
|
|
192
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#descriptive-attributes}
|
|
193
|
+
* @example "movie"
|
|
194
|
+
*/
|
|
195
|
+
contentType?: ContentType | string;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Content title: movie title for films; episode title for TV series.
|
|
199
|
+
*
|
|
200
|
+
* @example "The Dark Knight"
|
|
201
|
+
*/
|
|
202
|
+
title?: string;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Season title for TV series.
|
|
206
|
+
*
|
|
207
|
+
* @example "Battlestar Galactica Season 5"
|
|
208
|
+
*/
|
|
209
|
+
titleSeason?: string;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Secondary title for the video content.
|
|
213
|
+
*
|
|
214
|
+
* @example "2022"
|
|
215
|
+
*/
|
|
216
|
+
secondaryTitle?: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* An opaque, unique identifier for the content the app is playing. Each movie, episode,
|
|
220
|
+
* or other content should have a different program ID value. This identifier is used to
|
|
221
|
+
* debug content-specific playback issues. Roku will reference this programID in playback
|
|
222
|
+
* error reports, allowing developers to identify the content that failed to play.
|
|
223
|
+
*
|
|
224
|
+
* @example "54b2f1ae-a0e9-46e0-a4d7-47b4e00e9c15"
|
|
225
|
+
*/
|
|
226
|
+
programID?: string;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Description of content.
|
|
230
|
+
*
|
|
231
|
+
* @example "Batman, Gordon and Harvey Dent are forced…"
|
|
232
|
+
*/
|
|
233
|
+
description?: string;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* URL for SD content artwork.
|
|
237
|
+
*
|
|
238
|
+
* @example "mysite.com/img/sd1932.jpg"
|
|
239
|
+
*/
|
|
240
|
+
sdPosterUrl?: string;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* URL for HD content artwork.
|
|
244
|
+
*
|
|
245
|
+
* @example "mysite.com/img/hd1932.jpg"
|
|
246
|
+
*/
|
|
247
|
+
hdPosterUrl?: string;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* URL for FHD content artwork.
|
|
251
|
+
*
|
|
252
|
+
* @example "mysite.com/img/fhd1932.jpg"
|
|
253
|
+
*/
|
|
254
|
+
fhdPosterUrl?: string;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Formatted date string for the content release date.
|
|
258
|
+
*
|
|
259
|
+
* @example "3/31/2009"
|
|
260
|
+
*/
|
|
261
|
+
releaseDate?: string;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Selects an icon to be displayed for the corresponding MPAA or TV rating.
|
|
265
|
+
* The value will display as icon artwork at runtime.
|
|
266
|
+
*
|
|
267
|
+
* Valid values include: `"G"`, `"PG"`, `"PG-13"`, `"R"`, `"NC-17"`, `"UR"`, `"UNRATED"`, `"NR"`,
|
|
268
|
+
* `"TV-Y"`, `"TV-Y7"`, `"TV-Y7-FV"`, `"TV-G"`, `"TV-PG"`, `"TV-14"`, `"TV-MA"`.
|
|
269
|
+
*
|
|
270
|
+
* @example "PG-13"
|
|
271
|
+
*/
|
|
272
|
+
rating?: Rating | string;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Specifies the star rating to display as red star icon artwork, as a number from 1 to 100.
|
|
276
|
+
* - 20 → one star
|
|
277
|
+
* - 40 → two stars
|
|
278
|
+
* - 60 → three stars
|
|
279
|
+
* - 80 → four stars
|
|
280
|
+
* - 100 → five stars
|
|
281
|
+
*
|
|
282
|
+
* Numbers not divisible by 20 are displayed as a fractional star (e.g. 30 → one and a half stars).
|
|
283
|
+
*
|
|
284
|
+
* @example 80
|
|
285
|
+
*/
|
|
286
|
+
starRating?: number;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Specifies the user star rating to display as yellow star icon artwork, as a number from 1 to 100.
|
|
290
|
+
* - 20 → one star
|
|
291
|
+
* - 40 → two stars
|
|
292
|
+
* - 60 → three stars
|
|
293
|
+
* - 80 → four stars
|
|
294
|
+
* - 100 → five stars
|
|
295
|
+
*
|
|
296
|
+
* Does not display fractional stars for numbers not divisible by 20.
|
|
297
|
+
*
|
|
298
|
+
* @example 80
|
|
299
|
+
*/
|
|
300
|
+
userStarRating?: number;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Line 1 of Poster Screen Description.
|
|
304
|
+
*
|
|
305
|
+
* @example "The Dark Knight"
|
|
306
|
+
*/
|
|
307
|
+
shortDescriptionLine1?: string;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Line 2 of Poster Screen Description.
|
|
311
|
+
*
|
|
312
|
+
* @example "Rent $1.99, Buy $14.99"
|
|
313
|
+
*/
|
|
314
|
+
shortDescriptionLine2?: string;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Episode number.
|
|
318
|
+
*
|
|
319
|
+
* @example "1"
|
|
320
|
+
*/
|
|
321
|
+
episodeNumber?: string;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Number of episodes for a "season" or "series" contentType.
|
|
325
|
+
*
|
|
326
|
+
* @example 40
|
|
327
|
+
*/
|
|
328
|
+
numEpisodes?: number;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* List of actor names, or an individual actor name.
|
|
332
|
+
*
|
|
333
|
+
* @example ["Brad Pitt", "Angelina Jolie"]
|
|
334
|
+
* @example "Brad Pitt"
|
|
335
|
+
*/
|
|
336
|
+
actors?: string | string[];
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* List of director names.
|
|
340
|
+
*
|
|
341
|
+
* @example ["Joel Coen", "Clint Eastwood"]
|
|
342
|
+
*/
|
|
343
|
+
directors?: string[];
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* List of category/genre names, or an individual category/genre name.
|
|
347
|
+
*
|
|
348
|
+
* @example ["Comedy", "Drama"]
|
|
349
|
+
* @example "Comedy"
|
|
350
|
+
*/
|
|
351
|
+
categories?: string | string[];
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Album name. Used by roSpringboard audio style to display the album.
|
|
355
|
+
*
|
|
356
|
+
* @example "Achtung"
|
|
357
|
+
*/
|
|
358
|
+
album?: string;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Artist name. Used by roSpringboard audio style to show artist.
|
|
362
|
+
*
|
|
363
|
+
* @example "U2"
|
|
364
|
+
*/
|
|
365
|
+
artist?: string;
|
|
366
|
+
|
|
367
|
+
/** Text content. */
|
|
368
|
+
text?: string;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Text displayed in the upper left corner of roSlideShow slides.
|
|
372
|
+
*
|
|
373
|
+
* @example "Joe's Photos"
|
|
374
|
+
*/
|
|
375
|
+
textOverlayUL?: string;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Text displayed in the upper right corner of roSlideShow slides.
|
|
379
|
+
*
|
|
380
|
+
* @example "3 of 20"
|
|
381
|
+
*/
|
|
382
|
+
textOverlayUR?: string;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Text displayed on the bottom part of roSlideShow slides.
|
|
386
|
+
*
|
|
387
|
+
* @example "Wanda's 40th Birthday"
|
|
388
|
+
*/
|
|
389
|
+
textOverlayBody?: string;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Stream entry configuration for specifying stream settings.
|
|
394
|
+
*
|
|
395
|
+
* Used by `stream` (single adaptive stream) and `streams` (array of fixed bitrate streams).
|
|
396
|
+
*
|
|
397
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#playback-configuration-attributes}
|
|
398
|
+
*
|
|
399
|
+
* @example
|
|
400
|
+
* ```typescript
|
|
401
|
+
* // Single adaptive stream (e.g., HLS)
|
|
402
|
+
* const stream: IStreamEntry = {
|
|
403
|
+
* url: "http://example.com/stream.m3u8",
|
|
404
|
+
* quality: true,
|
|
405
|
+
* contentId: "hls-stream"
|
|
406
|
+
* };
|
|
407
|
+
*
|
|
408
|
+
* // Fixed bitrate stream variant
|
|
409
|
+
* const variant: IStreamEntry = {
|
|
410
|
+
* url: "http://example.com/video-500.mp4",
|
|
411
|
+
* bitrate: 500,
|
|
412
|
+
* quality: false,
|
|
413
|
+
* contentId: "mp4-500"
|
|
414
|
+
* };
|
|
415
|
+
* ```
|
|
416
|
+
*/
|
|
417
|
+
export interface IStreamEntry {
|
|
418
|
+
/**
|
|
419
|
+
* URL of the stream.
|
|
420
|
+
*
|
|
421
|
+
* @example "http://example.com/stream.m3u8"
|
|
422
|
+
*/
|
|
423
|
+
url: string;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Bitrate of the stream in kbps. Used for fixed bitrate streams.
|
|
427
|
+
*
|
|
428
|
+
* @example 500
|
|
429
|
+
*/
|
|
430
|
+
bitrate?: number;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Quality indicator. `true` for HD quality, `false` for SD.
|
|
434
|
+
*
|
|
435
|
+
* @example true
|
|
436
|
+
*/
|
|
437
|
+
quality?: boolean;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Content identifier logged in Roku logs to identify the stream and bitrate played.
|
|
441
|
+
*
|
|
442
|
+
* @example "my-stream-500"
|
|
443
|
+
*/
|
|
444
|
+
contentId?: string;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Subtitle track configuration for specifying available caption tracks.
|
|
449
|
+
*
|
|
450
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#playback-configuration-attributes}
|
|
451
|
+
*/
|
|
452
|
+
export interface ISubtitleTrack {
|
|
453
|
+
/**
|
|
454
|
+
* ISO 639.2B 3-character language code.
|
|
455
|
+
* Used to match the caption track with the audio language.
|
|
456
|
+
*
|
|
457
|
+
* @example "eng"
|
|
458
|
+
* @example "spa"
|
|
459
|
+
*/
|
|
460
|
+
Language: string;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Text shown for the corresponding track in the closed caption configuration dialog.
|
|
464
|
+
*
|
|
465
|
+
* @example "English"
|
|
466
|
+
* @example "Spanish (CC)"
|
|
467
|
+
*/
|
|
468
|
+
Description: string;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Track name or URL for sideloaded caption tracks.
|
|
472
|
+
*
|
|
473
|
+
* For in-stream captions, this is the track name (e.g., `"mkv/english1"`).
|
|
474
|
+
* For sideloaded captions, this is the URL where the caption file can be downloaded.
|
|
475
|
+
* Supported sideloaded formats: srt, ttml, dfxp.
|
|
476
|
+
*
|
|
477
|
+
* @example "mkv/english1"
|
|
478
|
+
* @example "https://example.com/captions/en.srt"
|
|
479
|
+
*/
|
|
480
|
+
TrackName: string;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/** Valid subtitle track source identifiers. */
|
|
484
|
+
export type SubtitleTrackSource = "ism" | "mkv" | "eia608" | "dvb";
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Subtitle track name in the format `"source/trackId"`.
|
|
488
|
+
*
|
|
489
|
+
* @example "mkv/english1"
|
|
490
|
+
* @example "dvb/eng_sdh"
|
|
491
|
+
* @example "eia608/1"
|
|
492
|
+
*/
|
|
493
|
+
export type SubtitleTrackName = `${SubtitleTrackSource}/${string}`;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Playback configuration metadata attributes for content items.
|
|
497
|
+
*
|
|
498
|
+
* These attributes configure the playback of the content item, including stream URLs,
|
|
499
|
+
* format, subtitles, trick play, and adaptive bitrate settings.
|
|
500
|
+
*
|
|
501
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#playback-configuration-attributes}
|
|
502
|
+
*/
|
|
503
|
+
export interface IPlaybackConfigurationAttributes {
|
|
504
|
+
/**
|
|
505
|
+
* Optional flag indicating video is live.
|
|
506
|
+
* Replaces time remaining in progress bar to display "Live".
|
|
507
|
+
*
|
|
508
|
+
* @default false
|
|
509
|
+
*/
|
|
510
|
+
live?: boolean;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Stream URL for Scene Graph Video node.
|
|
514
|
+
*
|
|
515
|
+
* @example "mysite.com/vid/vacation.mp4"
|
|
516
|
+
*/
|
|
517
|
+
url?: string;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* BIF URL for SD trick mode.
|
|
521
|
+
*
|
|
522
|
+
* @example "mysite.com/bif/sd1932.bif"
|
|
523
|
+
*/
|
|
524
|
+
sdBifUrl?: string;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* BIF URL for HD trick mode.
|
|
528
|
+
*
|
|
529
|
+
* @example "mysite.com/bif/hd1932.bif"
|
|
530
|
+
*/
|
|
531
|
+
hdBifUrl?: string;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* URL for an HD small icon image. Used by TimeGrid to display channel icons.
|
|
535
|
+
*
|
|
536
|
+
* @see {@link https://developer.roku.com/dev/docs/timegrid}
|
|
537
|
+
* @example "mysite.com/img/hd_icon_ch5.png"
|
|
538
|
+
*/
|
|
539
|
+
hdSmallIconUrl?: string;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* BIF URL for FHD trick mode.
|
|
543
|
+
*
|
|
544
|
+
* @example "mysite.com/bif/fhd1932.bif"
|
|
545
|
+
*/
|
|
546
|
+
fhdBifUrl?: string;
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Stream settings for a single adaptive stream (e.g., HLS or Smooth Streaming manifest).
|
|
550
|
+
*
|
|
551
|
+
* Supported by roVideoPlayer and roVideoScreen, but not the Roku Scene Graph Video node
|
|
552
|
+
* (use the top level `url`, `streamFormat`, etc. instead).
|
|
553
|
+
*
|
|
554
|
+
* The exception is when you don't have adaptive streams (typically MP4) and need to specify
|
|
555
|
+
* different bitrate variants separately — for that use case use the `streams` attribute.
|
|
556
|
+
*
|
|
557
|
+
* @example
|
|
558
|
+
* ```typescript
|
|
559
|
+
* stream: {
|
|
560
|
+
* url: "http://example.com/stream.m3u8",
|
|
561
|
+
* quality: true,
|
|
562
|
+
* contentId: "hls-main"
|
|
563
|
+
* }
|
|
564
|
+
* ```
|
|
565
|
+
*/
|
|
566
|
+
stream?: IStreamEntry;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Array of stream entries used to specify content metadata for a set of fixed bitrate streams.
|
|
570
|
+
* Each array item specifies the URL, bitrate, etc. for one stream variant.
|
|
571
|
+
*
|
|
572
|
+
* Recommended for non-adaptive video (such as MP4 progressive download) only.
|
|
573
|
+
* For adaptive streaming, use the `stream` attribute instead.
|
|
574
|
+
*
|
|
575
|
+
* @example
|
|
576
|
+
* ```typescript
|
|
577
|
+
* streams: [
|
|
578
|
+
* { url: "http://example.com/video-384.mp4", bitrate: 384, quality: false, contentId: "mp4-384" },
|
|
579
|
+
* { url: "http://example.com/video-2500.mp4", bitrate: 2500, quality: true, contentId: "mp4-2500" }
|
|
580
|
+
* ]
|
|
581
|
+
* ```
|
|
582
|
+
*/
|
|
583
|
+
streams?: IStreamEntry[];
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Array of bitrates in kbps for content streams. Recommended for non-adaptive video
|
|
587
|
+
* (such as MP4 progressive download) only.
|
|
588
|
+
* Must be used in conjunction with `streamUrls` and `streamQualities`.
|
|
589
|
+
*
|
|
590
|
+
* @example [384, 500, 1000, 1500]
|
|
591
|
+
*/
|
|
592
|
+
streamBitrates?: number[];
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Array of URLs for content streams. Recommended for non-adaptive video
|
|
596
|
+
* (such as MP4 progressive download) only.
|
|
597
|
+
* Must be used in conjunction with `streamBitrates` and `streamQualities`.
|
|
598
|
+
*/
|
|
599
|
+
streamUrls?: string[];
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Array of quality indicators identifying a stream as "SD" or "HD".
|
|
603
|
+
* Must be used in conjunction with `streamBitrates` and `streamUrls`.
|
|
604
|
+
*
|
|
605
|
+
* @example ["SD", "SD", "SD", "HD"]
|
|
606
|
+
*/
|
|
607
|
+
streamQualities?: StreamQuality[];
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Array of string values logged in Roku logs to identify stream and bitrate played.
|
|
611
|
+
*
|
|
612
|
+
* @example ["myco-19321-384.mp4", "myco-19321-500.mp4"]
|
|
613
|
+
*/
|
|
614
|
+
streamContentIDs?: string[];
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Array of boolean values indicating if the HTTP endpoint should be sticky and not
|
|
618
|
+
* subject to change on subsequent requests.
|
|
619
|
+
*
|
|
620
|
+
* @default false (for each entry)
|
|
621
|
+
*/
|
|
622
|
+
streamStickyHttpRedirects?: boolean[];
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* The offset into the stream which is considered the beginning of playback. Time in seconds.
|
|
626
|
+
*
|
|
627
|
+
* @default 0
|
|
628
|
+
* @example 3600
|
|
629
|
+
*/
|
|
630
|
+
streamStartTimeOffset?: number;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Type of content stream format.
|
|
634
|
+
*
|
|
635
|
+
* Valid values: `"mp4"`, `"hls"`, `"ism"` (smooth streaming), `"dash"` (MPEG-DASH),
|
|
636
|
+
* `"mkv"`, `"mka"`, `"mks"`, `"mp3"`.
|
|
637
|
+
*
|
|
638
|
+
* The `"mp4"` format also accepts `.mov` and `.m4v` files.
|
|
639
|
+
*/
|
|
640
|
+
streamFormat?: StreamFormat | string;
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Movie length in seconds. Length zero displays as "0m"; length not set will not display.
|
|
644
|
+
*
|
|
645
|
+
* @example 3600
|
|
646
|
+
*/
|
|
647
|
+
length?: number;
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* Defines the start position of the content, in seconds.
|
|
651
|
+
* Starting from Roku OS 8.0, supports negative values, allowing media players
|
|
652
|
+
* to start playback distanced from the edge of a live stream.
|
|
653
|
+
*
|
|
654
|
+
* @default 0
|
|
655
|
+
*/
|
|
656
|
+
playStart?: number;
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* Specifies the duration of a content item in seconds.
|
|
660
|
+
* Used by TimeGrid to determine the width of program cells.
|
|
661
|
+
*
|
|
662
|
+
* @default 0
|
|
663
|
+
*/
|
|
664
|
+
playDuration?: number;
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Boolean indicating if CC (closed captioning) icon should be displayed.
|
|
668
|
+
*/
|
|
669
|
+
closedCaptions?: boolean;
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* Boolean indicating if HD branding should be displayed.
|
|
673
|
+
*/
|
|
674
|
+
hdBranded?: boolean;
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Boolean indicating if content is HD.
|
|
678
|
+
*/
|
|
679
|
+
isHD?: boolean;
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Specifies the color to use when rendering subtitle text.
|
|
683
|
+
*
|
|
684
|
+
* @example "#FF0000"
|
|
685
|
+
*/
|
|
686
|
+
subtitleColor?: string;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Specifies the caption settings for content playback.
|
|
690
|
+
* `TrackName` sets the name of the caption track to render as a concatenation
|
|
691
|
+
* of the track source and track id separated by a "/".
|
|
692
|
+
*
|
|
693
|
+
* Valid track sources: `"ism"`, `"mkv"`, `"eia608"`, `"dvb"`.
|
|
694
|
+
*
|
|
695
|
+
* @example { TrackName: "mkv/english1" }
|
|
696
|
+
*/
|
|
697
|
+
subtitleConfig?: { TrackName: SubtitleTrackName };
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Sets the list of available caption tracks for the stream.
|
|
701
|
+
* This list is added to the track list in the closed caption configuration dialog
|
|
702
|
+
* that is displayed during video playback when the user presses the Roku remote * button.
|
|
703
|
+
*
|
|
704
|
+
* The Roku OS detects in-stream captions automatically, so specifying `subtitleTracks`
|
|
705
|
+
* is generally only needed for sideloaded captions.
|
|
706
|
+
*
|
|
707
|
+
* @example
|
|
708
|
+
* ```typescript
|
|
709
|
+
* subtitleTracks: [
|
|
710
|
+
* { Language: "eng", Description: "English", TrackName: "https://example.com/captions/en.srt" },
|
|
711
|
+
* { Language: "spa", Description: "Spanish", TrackName: "https://example.com/captions/es.srt" }
|
|
712
|
+
* ]
|
|
713
|
+
* ```
|
|
714
|
+
*/
|
|
715
|
+
subtitleTracks?: ISubtitleTrack[];
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Path to an SRT or TTML formatted file used to render subtitles or closed captions.
|
|
719
|
+
* Supported on roVideoScreen only.
|
|
720
|
+
*
|
|
721
|
+
* @example "mysite.com/vid/1932.srt"
|
|
722
|
+
*/
|
|
723
|
+
subtitleUrl?: string;
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* If set to true, hides the Scene Graph Video node trick play UI.
|
|
727
|
+
*
|
|
728
|
+
* @default false
|
|
729
|
+
*/
|
|
730
|
+
videoDisableUI?: boolean;
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Specifies the encoding scheme for PlayReady DRM.
|
|
734
|
+
*
|
|
735
|
+
* Valid values: `"PlayReadyLicenseAcquisitionUrl"`, `"PlayReadyLicenseAcquisitionAndChallenge"`.
|
|
736
|
+
*/
|
|
737
|
+
encodingType?: PlayReadyEncodingType | string;
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Specifies the PlayReady license acquisition URL and additional custom request data,
|
|
741
|
+
* determined by the `encodingType` value specified.
|
|
742
|
+
*/
|
|
743
|
+
encodingKey?: string;
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Specifies different stream switching algorithms for HLS adaptive streaming.
|
|
747
|
+
* Only has an effect on HLS streams.
|
|
748
|
+
*
|
|
749
|
+
* @default "full-adaptation"
|
|
750
|
+
*/
|
|
751
|
+
switchingStrategy?: string;
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Flag indicating if content has been watched.
|
|
755
|
+
*/
|
|
756
|
+
watched?: boolean;
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* Controls whether query string parameters from initial HLS stream manifest requests
|
|
760
|
+
* are forwarded to subsequent segment download requests.
|
|
761
|
+
*
|
|
762
|
+
* @default true
|
|
763
|
+
*/
|
|
764
|
+
forwardQueryStringParams?: boolean;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Controls whether query string parameters from initial DASH stream manifest requests
|
|
768
|
+
* are forwarded to subsequent segment download requests.
|
|
769
|
+
*
|
|
770
|
+
* @default false
|
|
771
|
+
*/
|
|
772
|
+
forwardDashQueryStringParams?: boolean;
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* When set to true, the media player will not stop playback when it encounters a
|
|
776
|
+
* streaming-related error. Instead, it will skip to the next item in the content list.
|
|
777
|
+
*
|
|
778
|
+
* @default false
|
|
779
|
+
*/
|
|
780
|
+
ignoreStreamErrors?: boolean;
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* Minimum startup bitrate specified in kbps. Streaming will start with a variant
|
|
784
|
+
* equal to or greater than this value.
|
|
785
|
+
* If not set or set to zero, any minimum start bitrate will be ignored.
|
|
786
|
+
*/
|
|
787
|
+
adaptiveMinStartBitrate?: number;
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Maximum startup bitrate specified in kbps. Streaming will start with a variant
|
|
791
|
+
* less than or equal to this value.
|
|
792
|
+
*
|
|
793
|
+
* @default 2500
|
|
794
|
+
*/
|
|
795
|
+
adaptiveMaxStartBitrate?: number;
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* Filters out any video profile/codec level combinations that the specified hardware
|
|
799
|
+
* cannot play. Currently only works for DASH streams.
|
|
800
|
+
*
|
|
801
|
+
* @default false
|
|
802
|
+
*/
|
|
803
|
+
filterCodecProfiles?: boolean;
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* Allows an app to customize Media Player behavior on live streams when playing in
|
|
807
|
+
* the earliest part of a DVR buffer.
|
|
808
|
+
*
|
|
809
|
+
* - `"resume"`: Default behavior.
|
|
810
|
+
* - `"stop"`: Stops playback.
|
|
811
|
+
* - `"pause"`: Keeps stream paused even in the earliest part of the buffer.
|
|
812
|
+
*
|
|
813
|
+
* Currently works only with Smooth and DASH streams.
|
|
814
|
+
*
|
|
815
|
+
* @default "resume"
|
|
816
|
+
* @since Roku OS 8.1
|
|
817
|
+
*/
|
|
818
|
+
liveBoundsPauseBehavior?: LiveBoundsPauseBehavior;
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* Sets the clip start position of the playback, in seconds.
|
|
822
|
+
*
|
|
823
|
+
* @since Roku OS 8.1
|
|
824
|
+
*/
|
|
825
|
+
clipStart?: number;
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Sets the clip end position of the playback, in seconds.
|
|
829
|
+
*
|
|
830
|
+
* @since Roku OS 8.1
|
|
831
|
+
*/
|
|
832
|
+
clipEnd?: number;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Specifies the audio codec that should be used during playback.
|
|
836
|
+
* The Media Player will select only audio renditions encoded with the specified codec.
|
|
837
|
+
*
|
|
838
|
+
* Valid values: `"aac"`, `"ac3"`, `"eac3"`.
|
|
839
|
+
*/
|
|
840
|
+
preferredAudioCodec?: PreferredAudioCodec | string;
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Comma-separated list of audio tracks (based on ISO 639-1 or ISO 639-2 language code)
|
|
844
|
+
* that may be selected from the Audio track setting for the content.
|
|
845
|
+
*
|
|
846
|
+
* @example "en, spa"
|
|
847
|
+
*/
|
|
848
|
+
audioWhitelist?: string;
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* Comma-separated list of audio tracks (based on ISO 639-1 or ISO 639-2 language code)
|
|
852
|
+
* that may not be selected from the Audio track setting for the content.
|
|
853
|
+
* If a language is both blacklisted and whitelisted, the blacklisting takes precedence.
|
|
854
|
+
*
|
|
855
|
+
* @since Roku OS 9.4
|
|
856
|
+
* @example "ita, fr"
|
|
857
|
+
*/
|
|
858
|
+
audioBlacklist?: string;
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* Comma-separated list of captioning tracks (based on ISO 639-2 language code)
|
|
862
|
+
* that may be selected from the Accessibility > Captioning track setting for the content.
|
|
863
|
+
*
|
|
864
|
+
* @example "en, spa"
|
|
865
|
+
*/
|
|
866
|
+
captionWhitelist?: string;
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* Comma-separated list of captioning tracks (based on ISO 639-2 language code)
|
|
870
|
+
* that may not be selected from the Accessibility > Captioning track setting for the content.
|
|
871
|
+
* If a language is both blacklisted and whitelisted, the blacklisting takes precedence.
|
|
872
|
+
*
|
|
873
|
+
* @since Roku OS 9.4
|
|
874
|
+
* @example "deu, dan"
|
|
875
|
+
*/
|
|
876
|
+
captionBlacklist?: string;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* DRM parameters passed via the `drmParams` content metadata attribute.
|
|
881
|
+
*
|
|
882
|
+
* Not all attributes are required, and may not have the same semantic meaning
|
|
883
|
+
* when applied to different DRM systems.
|
|
884
|
+
*
|
|
885
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#digital-rights-management-drm-control-attributes}
|
|
886
|
+
*/
|
|
887
|
+
export interface IDrmParams {
|
|
888
|
+
/**
|
|
889
|
+
* The DRM key system to use. This value is case-insensitive.
|
|
890
|
+
*
|
|
891
|
+
* @example "playready"
|
|
892
|
+
* @example "widevine"
|
|
893
|
+
*/
|
|
894
|
+
keySystem: DrmKeySystem | string;
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* URL location of a license server. May include CGI parameters.
|
|
898
|
+
* Required for both PlayReady and Widevine.
|
|
899
|
+
*
|
|
900
|
+
* @example "https://host.com/license/playready?contentid=090495867002"
|
|
901
|
+
*/
|
|
902
|
+
licenseServerURL?: string;
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* Server address used for device provisioning.
|
|
906
|
+
*
|
|
907
|
+
* @example "https://host.com/provision/device?esn=090495867002"
|
|
908
|
+
*/
|
|
909
|
+
serializationURL?: string;
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* Special meaning per DRM system. If supplied, expected to be a base64 encoded string.
|
|
913
|
+
*/
|
|
914
|
+
appData?: string;
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* @deprecated Use `licenseServerURL` instead. Specifies the PlayReady license acquisition data.
|
|
918
|
+
*/
|
|
919
|
+
encodingKey?: string;
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* @deprecated Use `licenseServerURL` instead. Specifies the encoding scheme for PlayReady DRM.
|
|
923
|
+
*
|
|
924
|
+
* Valid values: `"PlayReadyLicenseAcquisitionUrl"`, `"PlayReadyLicenseAcquisitionAndChallenge"`.
|
|
925
|
+
*/
|
|
926
|
+
encodingType?: PlayReadyEncodingType | string;
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* The actual certificate string for Widevine purposes, obtained out-of-band (OOB) by the app.
|
|
930
|
+
* Leave unset unless Widevine is used for DRM.
|
|
931
|
+
*/
|
|
932
|
+
serviceCert?: string;
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* URL location for sending license renewal requests.
|
|
936
|
+
* If not specified, the Roku OS sends renewal requests to the `licenseServerURL`.
|
|
937
|
+
*/
|
|
938
|
+
licenseRenewURL?: string;
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* The maximum amount of time (in milliseconds) that an app waits before rotating
|
|
942
|
+
* its Widevine DRM keys.
|
|
943
|
+
*/
|
|
944
|
+
lic_acq_window?: string;
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* Ignores the PSSH in the initialization segment. Enables support for Harmonic/DTV-GO
|
|
948
|
+
* DASH-IOP v5.0.0 streams with In-Band Key-Rotation Signaling.
|
|
949
|
+
*
|
|
950
|
+
* @default "false"
|
|
951
|
+
* @since Roku OS 14.5
|
|
952
|
+
*/
|
|
953
|
+
ignoreInitDataPssh?: string;
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Contains the license request template — the entire license request without
|
|
957
|
+
* the license challenge filled in. JSON or XML formats are supported.
|
|
958
|
+
*
|
|
959
|
+
* @since Roku OS 14.6
|
|
960
|
+
*/
|
|
961
|
+
licReqTemplate?: string;
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
* The format of the license request template.
|
|
965
|
+
*
|
|
966
|
+
* - `"JSON"`: `licReqTemplate` is in JSON format.
|
|
967
|
+
* - `"XML"`: `licReqTemplate` is in XML format.
|
|
968
|
+
* - `"BASE64"`: Does not use `licReqTemplate`; base64-encodes the challenge and sends it in POST body.
|
|
969
|
+
*
|
|
970
|
+
* If no value is specified, the license template is not used.
|
|
971
|
+
*
|
|
972
|
+
* @since Roku OS 14.6
|
|
973
|
+
*/
|
|
974
|
+
templateType?: DrmTemplateType | string;
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* jsonpath or xpath to the element whose value must contain the fixed token `LICENSE_CHALLENGE`.
|
|
978
|
+
* - jsonpath if `templateType` is `"JSON"`
|
|
979
|
+
* - xpath if `templateType` is `"XML"`
|
|
980
|
+
*
|
|
981
|
+
* The Roku OS replaces the `LICENSE_CHALLENGE` token with the base64-encoded license challenge.
|
|
982
|
+
*
|
|
983
|
+
* @since Roku OS 14.6
|
|
984
|
+
* @example ".parameters[0].body"
|
|
985
|
+
*/
|
|
986
|
+
requestField?: string;
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* jsonpath or xpath to the element that contains the base64-encoded license response.
|
|
990
|
+
* - jsonpath if `templateType` is `"JSON"`
|
|
991
|
+
* - xpath if `templateType` is `"XML"`
|
|
992
|
+
*
|
|
993
|
+
* @since Roku OS 14.6
|
|
994
|
+
* @example ".output.widevine2License.license"
|
|
995
|
+
*/
|
|
996
|
+
responseField?: string;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* Digital rights management (DRM) control attributes for content items.
|
|
1001
|
+
*
|
|
1002
|
+
* These attributes configure DRM through the `drmParams` parameter of type `Record<string, string>`.
|
|
1003
|
+
*
|
|
1004
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#digital-rights-management-drm-control-attributes}
|
|
1005
|
+
*/
|
|
1006
|
+
export interface IDrmAttributes {
|
|
1007
|
+
/**
|
|
1008
|
+
* DRM parameters for configuring PlayReady, Widevine, or other DRM systems.
|
|
1009
|
+
*
|
|
1010
|
+
* @example
|
|
1011
|
+
* ```tsx
|
|
1012
|
+
* <ContentNode
|
|
1013
|
+
* drmParams={{
|
|
1014
|
+
* keySystem: "widevine",
|
|
1015
|
+
* licenseServerURL: "https://host.com/license/widevine"
|
|
1016
|
+
* }}
|
|
1017
|
+
* />
|
|
1018
|
+
* ```
|
|
1019
|
+
*/
|
|
1020
|
+
drmParams?: IDrmParams;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* Content classification attributes for automatic sound and picture adjustment on Roku TVs.
|
|
1025
|
+
*
|
|
1026
|
+
* When auto mode is selected for the picture or sound settings, the Roku OS uses
|
|
1027
|
+
* the `contentClassifier` attribute to automatically adjust sound and picture.
|
|
1028
|
+
*
|
|
1029
|
+
* @since Roku OS 13.0
|
|
1030
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#content-classification-attributes}
|
|
1031
|
+
*/
|
|
1032
|
+
export interface IContentClassificationAttributes {
|
|
1033
|
+
/**
|
|
1034
|
+
* Specifies the genre of the content (e.g., action, sports, comedy).
|
|
1035
|
+
* The Roku OS uses this to automatically adjust sound and picture on Roku TVs
|
|
1036
|
+
* if auto mode is selected.
|
|
1037
|
+
*
|
|
1038
|
+
* @since Roku OS 13.0
|
|
1039
|
+
* @example "drama"
|
|
1040
|
+
*/
|
|
1041
|
+
contentClassifier?: ContentClassifier | string;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* CDN configuration entry for load balancing and failover.
|
|
1046
|
+
*/
|
|
1047
|
+
export interface ICdnConfigEntry {
|
|
1048
|
+
/** URL filter pattern for matching CDN. */
|
|
1049
|
+
URLFilter: string;
|
|
1050
|
+
/** Content filter for matching specific programs. */
|
|
1051
|
+
ContentFilter?: string;
|
|
1052
|
+
/** Priority level for CDN selection. Lower values indicate higher priority. */
|
|
1053
|
+
priority: number;
|
|
1054
|
+
/** Weight for load balancing within the same priority level. */
|
|
1055
|
+
weight: number;
|
|
1056
|
+
/** Service location identifier. */
|
|
1057
|
+
serviceLocation?: string;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* CDN switching attributes for managing load balancing and failover during playback.
|
|
1062
|
+
*
|
|
1063
|
+
* Content Delivery Networks (CDNs) can be switched during playback to load balance
|
|
1064
|
+
* traffic and failover to different servers in order to help optimize performance.
|
|
1065
|
+
*
|
|
1066
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#cdn-switching}
|
|
1067
|
+
*/
|
|
1068
|
+
export interface ICdnSwitchingAttributes {
|
|
1069
|
+
/**
|
|
1070
|
+
* CDN configuration for managing load balancing and failovers.
|
|
1071
|
+
* The `URLFilter`, `priority`, and `weight` attributes must be specified.
|
|
1072
|
+
*
|
|
1073
|
+
* To use this field, create a child node and use a playlist (even though only
|
|
1074
|
+
* one content item will be in the playlist). This field is updated only when
|
|
1075
|
+
* `contentIsPlayList` is true.
|
|
1076
|
+
*/
|
|
1077
|
+
cdnConfig?: ICdnConfigEntry[];
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
/**
|
|
1081
|
+
* SceneGraph certificate metadata attributes for configuring HTTP certificates and cookies
|
|
1082
|
+
* used by Audio and Video nodes.
|
|
1083
|
+
*
|
|
1084
|
+
* **Important**: When setting any of these attributes, values are set on the HTTPAgent
|
|
1085
|
+
* associated with the node. If the node does not have its own HTTPAgent (set via `setHttpAgent()`),
|
|
1086
|
+
* the Roku OS traverses the scene graph hierarchy until it finds the first node with an HTTPAgent.
|
|
1087
|
+
* If none is found, values are set on the global HTTPAgent.
|
|
1088
|
+
*
|
|
1089
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#scenegraph-certificate-attributes}
|
|
1090
|
+
*/
|
|
1091
|
+
export interface ICertificateAttributes {
|
|
1092
|
+
/**
|
|
1093
|
+
* If set, the Audio or Video node loads this public certificate bundle to authenticate the server.
|
|
1094
|
+
* The protocol must be HTTPS for this to have any effect.
|
|
1095
|
+
*
|
|
1096
|
+
* If this attribute is defined with a URI, the file URI is set into the HttpAgent instance.
|
|
1097
|
+
* If defined as an empty string (`""`), no changes are made to the HttpAgent.
|
|
1098
|
+
* If not defined and secure URLs exist in the metadata, the platform's default certificates are used.
|
|
1099
|
+
*/
|
|
1100
|
+
httpCertificatesFile?: string;
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* If set, the Audio or Video node sends the cookies to the server.
|
|
1104
|
+
* Each cookie must have the syntax: `dom=domain;path=path;name=name;val=value;`.
|
|
1105
|
+
*
|
|
1106
|
+
* When this attribute is set, all HTTP cookies in the agent are cleared
|
|
1107
|
+
* and replaced with the cookies defined by this attribute.
|
|
1108
|
+
*/
|
|
1109
|
+
httpCookies?: string[];
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* If set, the Audio or Video node sends these headers to the server.
|
|
1113
|
+
* Each string must be of the format `"name:value"`.
|
|
1114
|
+
*
|
|
1115
|
+
* When this attribute is set, all HTTP headers in the agent are cleared
|
|
1116
|
+
* and replaced with the headers defined by this attribute.
|
|
1117
|
+
*/
|
|
1118
|
+
httpHeaders?: string[];
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* If true, the Audio or Video node sends the client device certificate to the server
|
|
1122
|
+
* for client authentication. The protocol must be HTTPS for this to have any effect.
|
|
1123
|
+
*/
|
|
1124
|
+
httpSendClientCertificate?: boolean;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* Playback control metadata attributes for controlling playback parameters.
|
|
1129
|
+
*
|
|
1130
|
+
* These attributes set bandwidth constraints, resolution flags, and frame rate settings.
|
|
1131
|
+
*
|
|
1132
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#playback-control-attributes}
|
|
1133
|
+
*/
|
|
1134
|
+
export interface IPlaybackControlAttributes {
|
|
1135
|
+
/**
|
|
1136
|
+
* Will only select variant streams with a bandwidth higher than this minimum bandwidth.
|
|
1137
|
+
* Units are kbps.
|
|
1138
|
+
*
|
|
1139
|
+
* @example 48
|
|
1140
|
+
*/
|
|
1141
|
+
minBandwidth?: number;
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Will only select variant streams with a bandwidth less than this maximum bandwidth.
|
|
1145
|
+
* Units are kbps.
|
|
1146
|
+
*
|
|
1147
|
+
* @example 2500
|
|
1148
|
+
*/
|
|
1149
|
+
maxBandwidth?: number;
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Specifies that this stream was encoded at 1080p resolution.
|
|
1153
|
+
*/
|
|
1154
|
+
fullHD?: boolean;
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Specifies the frame rate the 1080p stream was encoded at.
|
|
1158
|
+
*
|
|
1159
|
+
* @example 24
|
|
1160
|
+
* @example 30
|
|
1161
|
+
*/
|
|
1162
|
+
frameRate?: number;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* Track ID metadata attributes for selecting specific audio, video, and subtitle tracks.
|
|
1167
|
+
*
|
|
1168
|
+
* Used primarily with SmoothStreaming (`StreamFormat = "ISM"`) to specify particular tracks
|
|
1169
|
+
* from the manifest file.
|
|
1170
|
+
*
|
|
1171
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#track-id-attributes}
|
|
1172
|
+
*/
|
|
1173
|
+
export interface ITrackIdAttributes {
|
|
1174
|
+
/**
|
|
1175
|
+
* Used in SmoothStreaming (`StreamFormat = "ISM"`) to specify the audio track.
|
|
1176
|
+
* Set to the desired track's `StreamIndex.Name` attribute from the manifest file.
|
|
1177
|
+
*
|
|
1178
|
+
* @example "Spanish"
|
|
1179
|
+
*/
|
|
1180
|
+
trackIDAudio?: string;
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* Used in SmoothStreaming (`StreamFormat = "ISM"`) to specify the video track.
|
|
1184
|
+
* Set to the desired track's `StreamIndex.Name` attribute from the manifest file.
|
|
1185
|
+
*
|
|
1186
|
+
* @example "h264video"
|
|
1187
|
+
*/
|
|
1188
|
+
trackIDVideo?: string;
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* Used to specify a closed caption track in a video stream that supports 608/708 captions.
|
|
1192
|
+
*
|
|
1193
|
+
* @example "eia608/1"
|
|
1194
|
+
*/
|
|
1195
|
+
trackIDSubtitle?: string;
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* If set to `"dolby-digital"`, displays a "5.1 ))" icon in the lower left of a
|
|
1199
|
+
* movie style springboard screen.
|
|
1200
|
+
*
|
|
1201
|
+
* @example "dolby-digital"
|
|
1202
|
+
*/
|
|
1203
|
+
audioFormat?: string;
|
|
1204
|
+
|
|
1205
|
+
/**
|
|
1206
|
+
* @deprecated As of Roku OS 9.2. Users can select their preferred audio language
|
|
1207
|
+
* on-device in Settings > Audio > Audio Preferred Language.
|
|
1208
|
+
*/
|
|
1209
|
+
audioLanguageSelected?: string;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* roListScreen-specific metadata attributes for specifying background images.
|
|
1214
|
+
*
|
|
1215
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata#rolistscreen-attributes}
|
|
1216
|
+
*/
|
|
1217
|
+
export interface IListScreenAttributes {
|
|
1218
|
+
/**
|
|
1219
|
+
* URL for the SD background image used by roListScreen.
|
|
1220
|
+
*
|
|
1221
|
+
* @example "mysite.com/images/bg1_sd.jpg"
|
|
1222
|
+
*/
|
|
1223
|
+
sdBackgroundImageUrl?: string;
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
* URL for the HD background image used by roListScreen.
|
|
1227
|
+
*
|
|
1228
|
+
* @example "mysite.com/images/bg1_hd.jpg"
|
|
1229
|
+
*/
|
|
1230
|
+
hdBackgroundImageUrl?: string;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
/**
|
|
1234
|
+
* Content metadata attributes used by ZoomRowList to control per-item layout.
|
|
1235
|
+
*
|
|
1236
|
+
* When `useDefaultAspectRatio` is `false` for a row, ZoomRowList reads these
|
|
1237
|
+
* fields from each item's ContentNode instead of using the row-level defaults.
|
|
1238
|
+
*
|
|
1239
|
+
* @see {@link https://developer.roku.com/dev/docs/zoomrowlist}
|
|
1240
|
+
*/
|
|
1241
|
+
export interface IZoomRowListDataAttributes {
|
|
1242
|
+
/**
|
|
1243
|
+
* Aspect ratio (width/height) of this content item. Used by ZoomRowList to
|
|
1244
|
+
* compute item width from the interpolated height when `useDefaultAspectRatio`
|
|
1245
|
+
* is `false` for that row.
|
|
1246
|
+
*
|
|
1247
|
+
* @see {@link https://developer.roku.com/dev/docs/zoomrowlist}
|
|
1248
|
+
* @example 1.7777778
|
|
1249
|
+
*/
|
|
1250
|
+
aspectRatio?: number;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* Properties for the ContentNode node.
|
|
1255
|
+
*
|
|
1256
|
+
* ContentNode allows you to specify the data used to configure a node or component. Many nodes and
|
|
1257
|
+
* components require a ContentNode as the specification of their `content` field in order to be
|
|
1258
|
+
* properly configured. Lists, grids, and panels typically require a ContentNode for configuration.
|
|
1259
|
+
*
|
|
1260
|
+
* ContentNodes are typically structured as one ContentNode parent node with a hierarchy of child
|
|
1261
|
+
* nodes that specify the actual data. You should use ContentNode for complex data structures rather
|
|
1262
|
+
* than associative arrays — ContentNode objects are passed by reference, while associative arrays
|
|
1263
|
+
* are copied.
|
|
1264
|
+
*
|
|
1265
|
+
* All Content Meta-Data attributes are accessible as fields using dot notation on a ContentNode object.
|
|
1266
|
+
*
|
|
1267
|
+
* @see {@link https://developer.roku.com/dev/docs/contentnode}
|
|
1268
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata}
|
|
1269
|
+
*/
|
|
1270
|
+
export interface IContentNodeProps
|
|
1271
|
+
extends
|
|
1272
|
+
INodeProps,
|
|
1273
|
+
IDescriptiveAttributes,
|
|
1274
|
+
IPlaybackConfigurationAttributes,
|
|
1275
|
+
IDrmAttributes,
|
|
1276
|
+
IContentClassificationAttributes,
|
|
1277
|
+
ICdnSwitchingAttributes,
|
|
1278
|
+
ICertificateAttributes,
|
|
1279
|
+
IPlaybackControlAttributes,
|
|
1280
|
+
ITrackIdAttributes,
|
|
1281
|
+
IListScreenAttributes,
|
|
1282
|
+
IZoomRowListDataAttributes {}
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* Properties for a video-specific ContentNode.
|
|
1286
|
+
*
|
|
1287
|
+
* Extends {@link IContentNodeProps} with video stream URL and format fields commonly used
|
|
1288
|
+
* when configuring a Scene Graph Video node's content.
|
|
1289
|
+
*
|
|
1290
|
+
* @see {@link https://developer.roku.com/dev/docs/contentnode}
|
|
1291
|
+
* @see {@link https://developer.roku.com/dev/docs/video}
|
|
1292
|
+
*/
|
|
1293
|
+
export interface IVideoContentNodeProps extends IContentNodeProps {
|
|
1294
|
+
/**
|
|
1295
|
+
* Stream URL for the video content. Overrides the base `url` field for explicit video use.
|
|
1296
|
+
*
|
|
1297
|
+
* @example "https://example.com/stream.m3u8"
|
|
1298
|
+
*/
|
|
1299
|
+
url?: string;
|
|
1300
|
+
|
|
1301
|
+
/**
|
|
1302
|
+
* The stream format of the video content (SceneGraph field `streamformat`).
|
|
1303
|
+
*
|
|
1304
|
+
* Valid values: `"mp4"`, `"hls"`, `"ism"`, `"dash"`, `"mkv"`.
|
|
1305
|
+
*
|
|
1306
|
+
* @remarks The RSG SDK does not currently wire this through for
|
|
1307
|
+
* `VideoContentNode`; omit it and rely on URL / player behavior until support
|
|
1308
|
+
* lands.
|
|
1309
|
+
*/
|
|
1310
|
+
streamformat?: StreamFormat | string;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* @deprecated Use {@link IPlaybackConfigurationAttributes} instead.
|
|
1315
|
+
*/
|
|
1316
|
+
export type IPlaybackConfiguration = IPlaybackConfigurationAttributes;
|