react-native-roku 0.0.0-stage → 0.2.0-preview.3
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/CHANGELOG.md +328 -0
- package/CONTRIBUTING.md +34 -0
- package/LICENSE +21 -0
- package/NOTICE.md +10 -0
- package/README.md +66 -2
- package/bin/react-native-roku.mjs +91 -0
- package/build/assets.cjs +311 -0
- package/build/assets.d.cts +50 -0
- package/build/compatibility.d.mts +40 -0
- package/build/compatibility.mjs +272 -0
- package/build/dev.d.mts +34 -0
- package/build/dev.mjs +297 -0
- package/build/devWorkspace.d.mts +11 -0
- package/build/devWorkspace.mjs +86 -0
- package/build/device.d.mts +47 -0
- package/build/device.mjs +310 -0
- package/build/environment.d.mts +29 -0
- package/build/environment.mjs +144 -0
- package/build/esbuild.d.mts +5 -0
- package/build/esbuild.mjs +118 -0
- package/build/fontVariants.d.mts +27 -0
- package/build/fontVariants.mjs +424 -0
- package/build/frontend.d.mts +52 -0
- package/build/frontend.mjs +75 -0
- package/build/identity.mjs +45 -0
- package/build/index.d.mts +22 -0
- package/build/index.mjs +87 -0
- package/build/intl.mjs +121 -0
- package/build/metro.cjs +38 -0
- package/build/metro.d.cts +37 -0
- package/build/metroFrontend.mjs +222 -0
- package/build/metroMetadata.mjs +119 -0
- package/build/metroModules.mjs +397 -0
- package/build/metroRefresh.d.mts +64 -0
- package/build/metroRefresh.mjs +346 -0
- package/build/metroTransformer.cjs +146 -0
- package/build/nativeTextMemo.mjs +296 -0
- package/build/nativewind.d.mts +9 -0
- package/build/nativewind.mjs +92 -0
- package/build/project.d.mts +111 -0
- package/build/project.mjs +615 -0
- package/build/reactCompiler.mjs +113 -0
- package/build/reactProfile.cjs +35 -0
- package/build/refreshRuntime.mjs +187 -0
- package/build/refreshSourceMap.mjs +53 -0
- package/build/release.mjs +99 -0
- package/build/resolution.d.mts +3 -0
- package/build/resolution.mjs +25 -0
- package/build/surfaces.d.mts +1 -0
- package/build/surfaces.mjs +42 -0
- package/build/testing/node.d.mts +29 -0
- package/build/testing/node.mjs +106 -0
- package/build/yoga.d.mts +8 -0
- package/build/yoga.mjs +186 -0
- package/compatibility/public-api.json +327 -0
- package/compatibility/registry.json +2258 -0
- package/config/release.json +15 -0
- package/config/toolchain.json +34 -0
- package/docs/compatibility.md +813 -0
- package/docs/getting-started.md +460 -0
- package/docs/maintenance.md +368 -0
- package/docs/qualification.md +241 -0
- package/docs/standalone-testing.md +56 -0
- package/examples/hello-roku/README.md +35 -0
- package/examples/hello-roku/package.template.json +31 -0
- package/examples/hello-roku/pnpm-workspace.yaml +11 -0
- package/examples/hello-roku/roku.config.json +22 -0
- package/examples/hello-roku/src/App.tsx +54 -0
- package/examples/hello-roku/src/Catalog.tsx +200 -0
- package/examples/hello-roku/src/assets.d.ts +16 -0
- package/examples/hello-roku/src/catalog-cover.png +0 -0
- package/examples/hello-roku/tsconfig.json +1 -0
- package/examples/hello-roku/tsconfig.react.json +1 -0
- package/native/components/RNRAppControl.brs +215 -0
- package/native/components/RNRAppControl.xml +13 -0
- package/native/components/RNRDeviceFacts.brs +19 -0
- package/native/components/RNRDeviceFacts.xml +9 -0
- package/native/components/RNRDeviceFactsTask.brs +74 -0
- package/native/components/RNRDeviceFactsTask.xml +9 -0
- package/native/components/RNRTextRaster.brs +15 -0
- package/native/components/RNRTextRaster.xml +9 -0
- package/native/components/RNRTextRasterTask.brs +77 -0
- package/native/components/RNRTextRasterTask.xml +9 -0
- package/native/manifest.json +7 -0
- package/package.json +183 -3
- package/src/animation/clock.ts +10 -0
- package/src/animation/derivedValue.ts +163 -0
- package/src/animation/legacyAnimated.ts +255 -0
- package/src/animation/reanimated.ts +243 -0
- package/src/animation/sharedValue.ts +285 -0
- package/src/animation/worklets.ts +23 -0
- package/src/application/AppRegistry.ts +31 -0
- package/src/application/mountApplication.ts +136 -0
- package/src/graphics/BitmapLayer.tsx +68 -0
- package/src/graphics/RoundedBorder.tsx +116 -0
- package/src/graphics/TextRasterCache.ts +259 -0
- package/src/graphics/gradient.ts +37 -0
- package/src/graphics/inlineRaster.ts +85 -0
- package/src/graphics/png.ts +77 -0
- package/src/graphics/rasterPixels.ts +89 -0
- package/src/graphics/surfaces.ts +105 -0
- package/src/graphics/textRaster.types.ts +60 -0
- package/src/graphics/textRasterGeometry.ts +116 -0
- package/src/host/host.types.ts +57 -0
- package/src/index.ts +22 -0
- package/src/interop/nativewind.ts +2 -0
- package/src/layout/FontResources.ts +252 -0
- package/src/layout/affine.ts +89 -0
- package/src/layout/flexLayout.ts +398 -0
- package/src/layout/fontFaces.d.mts +19 -0
- package/src/layout/fontFaces.mjs +85 -0
- package/src/layout/fontVariants.d.mts +2 -0
- package/src/layout/fontVariants.mjs +8 -0
- package/src/layout/inlineParagraph.ts +158 -0
- package/src/layout/inlineText.ts +68 -0
- package/src/layout/layoutReuse.ts +117 -0
- package/src/layout/nativeNodeFields.ts +179 -0
- package/src/layout/preparedFields.ts +78 -0
- package/src/layout/textLayout.ts +138 -0
- package/src/layout/transform.ts +113 -0
- package/src/media/SceneGraphAudio.ts +161 -0
- package/src/media/SceneGraphVideo.ts +167 -0
- package/src/media/audioSession.ts +84 -0
- package/src/media/index.ts +2 -0
- package/src/media/videoErrorDetails.ts +40 -0
- package/src/media/videoSession.ts +136 -0
- package/src/navigation/RouterStore.ts +244 -0
- package/src/navigation/expoRouter.ts +115 -0
- package/src/react-native/NativeInput.ts +494 -0
- package/src/react-native/NativeSystemState.ts +95 -0
- package/src/react-native/accessibility.ts +265 -0
- package/src/react-native/activityIndicator.ts +72 -0
- package/src/react-native/compilerPressable.ts +26 -0
- package/src/react-native/createNativeRoot.ts +2126 -0
- package/src/react-native/directionalFocus.ts +55 -0
- package/src/react-native/environment.ts +275 -0
- package/src/react-native/flatList.ts +1001 -0
- package/src/react-native/flatListViewability.ts +231 -0
- package/src/react-native/focusEvents.ts +85 -0
- package/src/react-native/image.ts +247 -0
- package/src/react-native/index.ts +54 -0
- package/src/react-native/interactionManager.ts +76 -0
- package/src/react-native/keyboard.ts +60 -0
- package/src/react-native/linearGradient.ts +94 -0
- package/src/react-native/modal.tsx +148 -0
- package/src/react-native/nativeHostContext.ts +80 -0
- package/src/react-native/nativeModules.ts +86 -0
- package/src/react-native/nativeRoot.types.ts +22 -0
- package/src/react-native/nativeViewHandle.ts +191 -0
- package/src/react-native/nativewindPressable.ts +38 -0
- package/src/react-native/panResponder.ts +73 -0
- package/src/react-native/primitives.ts +685 -0
- package/src/react-native/safeArea.ts +76 -0
- package/src/react-native/scrollView.ts +289 -0
- package/src/react-native/styleInterop.ts +8 -0
- package/src/react-native/styleSheet.ts +54 -0
- package/src/react-native/textInput.ts +334 -0
- package/src/react-native/unsupported.ts +25 -0
- package/src/renderer/SceneRoot.ts +1006 -0
- package/src/scene/SdkDeviceFacts.ts +151 -0
- package/src/scene/SdkDeviceServices.ts +72 -0
- package/src/scene/SdkSceneGraph.ts +124 -0
- package/src/scene/SdkTextEntry.ts +321 -0
- package/src/scene/SdkTextMetrics.ts +136 -0
- package/src/scene/SdkTextRasterTransport.ts +191 -0
- package/src/scene/SdkWebTransport.ts +122 -0
- package/src/scene/createRokuHost.ts +213 -0
- package/src/scene/sceneGraph.types.ts +38 -0
- package/src/services/DeviceServices.ts +53 -0
- package/src/services/RegistryStorage.ts +85 -0
- package/src/services/RokuKeySession.ts +29 -0
- package/src/services/asyncStorage.ts +23 -0
- package/src/services/base64.ts +52 -0
- package/src/services/crypto.ts +18 -0
- package/src/services/expoConstants.ts +11 -0
- package/src/services/expoLinking.ts +12 -0
- package/src/services/expoStatusBar.ts +4 -0
- package/src/services/installWebRuntime.ts +105 -0
- package/src/services/intlEnglish.ts +54 -0
- package/src/services/languageRuntime.ts +65 -0
- package/src/services/nativeTimers.ts +96 -0
- package/src/services/secureStore.ts +23 -0
- package/src/services/textEntryRequest.ts +22 -0
- package/src/services/utf8.ts +57 -0
- package/src/services/webRuntime.ts +346 -0
- package/src/testing/CanvasResources.ts +141 -0
- package/src/testing/CanvasSceneGraph.ts +496 -0
- package/src/testing/CanvasTextEntry.ts +237 -0
- package/src/testing/PreviewTextObservations.ts +82 -0
- package/src/testing/RecordingSceneGraph.ts +136 -0
- package/src/types/normalize-colors.d.ts +4 -0
- package/src/vector/dynamicSvg.tsx +226 -0
- package/src/vector/svg.ts +222 -0
- package/src/vector/svg.types.ts +4 -0
- package/src/vector/svgElements.ts +58 -0
- package/src/vector/svgKey.d.mts +4 -0
- package/src/vector/svgKey.mjs +16 -0
- package/src/vector/svgPath.ts +157 -0
- package/src/vector/svgPixels.ts +133 -0
- package/tsconfig.consumer.json +29 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { LayoutStyle } from "../layout/flexLayout";
|
|
2
|
+
import { getFontMeasure } from "@roku-sdk/runtime/font";
|
|
3
|
+
import {
|
|
4
|
+
FontResources,
|
|
5
|
+
type FontCancellation,
|
|
6
|
+
type FontResourcesOptions,
|
|
7
|
+
} from "../layout/FontResources";
|
|
8
|
+
import { RokuHostError, type SceneNodeRef } from "./sceneGraph.types";
|
|
9
|
+
import type { SdkSceneGraph } from "./SdkSceneGraph";
|
|
10
|
+
|
|
11
|
+
const cachedWidthsPerFont = 64;
|
|
12
|
+
const cacheableTextLength = 256;
|
|
13
|
+
type FontWidths = WeakMap<SceneNodeRef, Map<string, number>>;
|
|
14
|
+
|
|
15
|
+
// Some firmware leaves the SDK readiness promise pending after native
|
|
16
|
+
// measurements start succeeding. FontResources owns the deadline and cancels
|
|
17
|
+
// this poll when a font times out or the host is retired.
|
|
18
|
+
function waitForMeasurableFont(scene: SdkSceneGraph, font: SceneNodeRef, signal: FontCancellation) {
|
|
19
|
+
return new Promise<void>((resolve, reject) => {
|
|
20
|
+
let timer: ReturnType<typeof setTimeout> | undefined;
|
|
21
|
+
let delay = 16;
|
|
22
|
+
function finish() {
|
|
23
|
+
if (timer !== undefined) clearTimeout(timer);
|
|
24
|
+
signal.removeEventListener("abort", cancel);
|
|
25
|
+
}
|
|
26
|
+
function cancel() {
|
|
27
|
+
finish();
|
|
28
|
+
reject(
|
|
29
|
+
signal.reason ?? new RokuHostError("C04_FONT_DISPOSED", "Font readiness was cancelled"),
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
function check() {
|
|
33
|
+
if (signal.aborted) {
|
|
34
|
+
cancel();
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
let height: number | undefined;
|
|
38
|
+
try {
|
|
39
|
+
height = getFontMeasure().getOneLineHeight(scene.native(font).r);
|
|
40
|
+
} catch {
|
|
41
|
+
// The native API can throw until the Label's font is initialized.
|
|
42
|
+
}
|
|
43
|
+
if (height !== undefined && Number.isFinite(height) && height > 0) {
|
|
44
|
+
finish();
|
|
45
|
+
queueMicrotask(resolve);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
timer = setTimeout(() => {
|
|
49
|
+
timer = undefined;
|
|
50
|
+
check();
|
|
51
|
+
}, delay);
|
|
52
|
+
delay = Math.min(delay * 2, 250);
|
|
53
|
+
}
|
|
54
|
+
signal.addEventListener("abort", cancel);
|
|
55
|
+
check();
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** Device metrics, measured by Roku from the exact packaged font used by Labels. */
|
|
60
|
+
export class SdkTextMetrics extends FontResources {
|
|
61
|
+
private readonly measurements: { widths: FontWidths };
|
|
62
|
+
|
|
63
|
+
preparedFieldFont(style: LayoutStyle): SceneNodeRef {
|
|
64
|
+
return this.font(style);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
readRetainedFontLineHeight(font: SceneNodeRef): number {
|
|
68
|
+
return this.retainedLineHeight(font);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
dispose(): void {
|
|
72
|
+
this.measurements.widths = new WeakMap();
|
|
73
|
+
super.dispose();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
constructor(scene: SdkSceneGraph, options: FontResourcesOptions) {
|
|
77
|
+
const measurements = { widths: new WeakMap() as FontWidths };
|
|
78
|
+
super(
|
|
79
|
+
scene,
|
|
80
|
+
{
|
|
81
|
+
async ready(font, signal) {
|
|
82
|
+
// Roku OS initializes a packaged font when a Label references it.
|
|
83
|
+
// Keep the Label transparent and retire it once the font is measurable.
|
|
84
|
+
const label = scene.create("label");
|
|
85
|
+
let attached = false;
|
|
86
|
+
try {
|
|
87
|
+
scene.batch(() => {
|
|
88
|
+
scene.insert(scene.root, label);
|
|
89
|
+
attached = true;
|
|
90
|
+
scene.set(label, "opacity", 0);
|
|
91
|
+
scene.set(label, "text", "");
|
|
92
|
+
scene.set(label, "font", font);
|
|
93
|
+
});
|
|
94
|
+
await waitForMeasurableFont(scene, font, signal);
|
|
95
|
+
} finally {
|
|
96
|
+
if (attached) scene.batch(() => scene.remove(scene.root, label));
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
metrics(font) {
|
|
100
|
+
const ref = scene.native(font).r,
|
|
101
|
+
api = getFontMeasure();
|
|
102
|
+
// Probe the native font on each metrics request, even for cached widths.
|
|
103
|
+
const lineHeight = api.getOneLineHeight(ref);
|
|
104
|
+
const generation = measurements.widths;
|
|
105
|
+
let widths = generation.get(font);
|
|
106
|
+
if (!widths) {
|
|
107
|
+
widths = new Map();
|
|
108
|
+
generation.set(font, widths);
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
lineHeight,
|
|
112
|
+
width(text) {
|
|
113
|
+
const cacheable =
|
|
114
|
+
generation === measurements.widths && text.length <= cacheableTextLength;
|
|
115
|
+
const cached = cacheable ? widths.get(text) : undefined;
|
|
116
|
+
if (cached !== undefined) return cached;
|
|
117
|
+
const width = api.getOneLineWidth(ref, text, 2_147_483_647);
|
|
118
|
+
if (!Number.isFinite(width) || width < 0)
|
|
119
|
+
throw new RokuHostError("C04_FONT_METRICS", "Roku returned invalid text width");
|
|
120
|
+
if (cacheable && generation === measurements.widths) {
|
|
121
|
+
if (widths.size === cachedWidthsPerFont) {
|
|
122
|
+
const oldest = widths.keys().next().value;
|
|
123
|
+
if (oldest !== undefined) widths.delete(oldest);
|
|
124
|
+
}
|
|
125
|
+
widths.set(text, width);
|
|
126
|
+
}
|
|
127
|
+
return width;
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
options,
|
|
133
|
+
);
|
|
134
|
+
this.measurements = measurements;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import type { DomNode, TmValue } from "@roku-sdk/interfaces";
|
|
2
|
+
import { tmTransaction } from "@roku-sdk/solid";
|
|
3
|
+
import { transactionManager } from "@roku-sdk/common/transaction";
|
|
4
|
+
import type { TextRasterTransport } from "../graphics/TextRasterCache";
|
|
5
|
+
import type { TextRasterSpec } from "../graphics/textRaster.types";
|
|
6
|
+
import { decodeBase64, encodeBase64 } from "../services/base64";
|
|
7
|
+
import { RokuHostError } from "./sceneGraph.types";
|
|
8
|
+
interface Reply {
|
|
9
|
+
readonly id: number;
|
|
10
|
+
readonly error?: string;
|
|
11
|
+
readonly pixels?: string;
|
|
12
|
+
readonly uri?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Two-phase native font mask / portable JS paint pipeline. All payloads are mechanical graphics. */
|
|
15
|
+
export class SdkTextRasterTransport implements TextRasterTransport {
|
|
16
|
+
private sequence = 0;
|
|
17
|
+
private disposed = false;
|
|
18
|
+
private disposing = false;
|
|
19
|
+
private disposalSubmitted = false;
|
|
20
|
+
private listenerDetached = false;
|
|
21
|
+
private tail = Promise.resolve();
|
|
22
|
+
private current?: {
|
|
23
|
+
id: number;
|
|
24
|
+
resolve(reply: Reply): void;
|
|
25
|
+
reject(error: unknown): void;
|
|
26
|
+
timer: ReturnType<typeof setTimeout>;
|
|
27
|
+
};
|
|
28
|
+
private readonly listener = (value: unknown) => {
|
|
29
|
+
let reply: Reply;
|
|
30
|
+
try {
|
|
31
|
+
reply = JSON.parse(String(value)) as Reply;
|
|
32
|
+
} catch {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const pending = this.current;
|
|
36
|
+
if (!pending || reply.id !== pending.id) return;
|
|
37
|
+
this.current = undefined;
|
|
38
|
+
clearTimeout(pending.timer);
|
|
39
|
+
if (reply.error) pending.reject(new RokuHostError("C04_NATIVE_RASTER", reply.error));
|
|
40
|
+
else pending.resolve(reply);
|
|
41
|
+
};
|
|
42
|
+
constructor(
|
|
43
|
+
private readonly node: DomNode,
|
|
44
|
+
private readonly fonts: Readonly<Record<string, string>>,
|
|
45
|
+
namespace: string,
|
|
46
|
+
) {
|
|
47
|
+
this.fonts = Object.freeze({ ...fonts });
|
|
48
|
+
if (!/^[a-zA-Z0-9-]{1,80}$/.test(namespace))
|
|
49
|
+
throw new RokuHostError("C04_RASTER_NAMESPACE", "Invalid temporary raster namespace");
|
|
50
|
+
this.batch(() => {
|
|
51
|
+
tmTransaction.setProperty(node, "namespace", namespace);
|
|
52
|
+
tmTransaction.setProperty(node, "onReply", this.listener as TmValue);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
private batch(work: () => void): void {
|
|
56
|
+
transactionManager.startTransaction();
|
|
57
|
+
work();
|
|
58
|
+
}
|
|
59
|
+
private request(payload: Record<string, unknown>): Promise<Reply> {
|
|
60
|
+
if (this.disposed)
|
|
61
|
+
return Promise.reject(
|
|
62
|
+
new RokuHostError("C04_RASTER_DISPOSED", "Native text raster transport retired"),
|
|
63
|
+
);
|
|
64
|
+
const result = this.tail.then(
|
|
65
|
+
() =>
|
|
66
|
+
new Promise<Reply>((resolve, reject) => {
|
|
67
|
+
if (this.disposed) {
|
|
68
|
+
reject(
|
|
69
|
+
new RokuHostError("C04_RASTER_DISPOSED", "Native text raster transport retired"),
|
|
70
|
+
);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const id = ++this.sequence;
|
|
74
|
+
const timer = setTimeout(() => {
|
|
75
|
+
if (this.current?.id !== id) return;
|
|
76
|
+
this.current = undefined;
|
|
77
|
+
reject(
|
|
78
|
+
new RokuHostError("C04_RASTER_TIMEOUT", "Native text raster operation timed out"),
|
|
79
|
+
);
|
|
80
|
+
}, 20_000);
|
|
81
|
+
this.current = { id, resolve, reject, timer };
|
|
82
|
+
try {
|
|
83
|
+
this.batch(() =>
|
|
84
|
+
tmTransaction.setProperty(this.node, "request", JSON.stringify({ ...payload, id })),
|
|
85
|
+
);
|
|
86
|
+
} catch (error) {
|
|
87
|
+
clearTimeout(timer);
|
|
88
|
+
if (this.current?.id === id) this.current = undefined;
|
|
89
|
+
reject(error);
|
|
90
|
+
}
|
|
91
|
+
}),
|
|
92
|
+
);
|
|
93
|
+
this.tail = result.then(
|
|
94
|
+
() => undefined,
|
|
95
|
+
() => undefined,
|
|
96
|
+
);
|
|
97
|
+
return result;
|
|
98
|
+
}
|
|
99
|
+
async mask(spec: TextRasterSpec): Promise<Uint8Array> {
|
|
100
|
+
const font = this.fonts[spec.fontFamily];
|
|
101
|
+
if (!font)
|
|
102
|
+
throw new RokuHostError("C04_FONT_ASSET", "No packaged font exists for the raster request");
|
|
103
|
+
const reply = await this.request({
|
|
104
|
+
type: "mask",
|
|
105
|
+
width: spec.width,
|
|
106
|
+
height: spec.height,
|
|
107
|
+
font,
|
|
108
|
+
size: spec.fontSize,
|
|
109
|
+
lineHeight: spec.lineHeight,
|
|
110
|
+
commands: spec.commands,
|
|
111
|
+
});
|
|
112
|
+
const rgba = decodeBase64(reply.pixels ?? "");
|
|
113
|
+
if (rgba.length !== spec.width * spec.height * 4)
|
|
114
|
+
throw new RokuHostError("C04_RASTER_PIXELS", "Native font mask has the wrong byte length");
|
|
115
|
+
const alpha = new Uint8Array(spec.width * spec.height);
|
|
116
|
+
for (let index = 0; index < alpha.length; index++) alpha[index] = rgba[index * 4 + 3];
|
|
117
|
+
return alpha;
|
|
118
|
+
}
|
|
119
|
+
async write(name: string, bytes: Uint8Array): Promise<string> {
|
|
120
|
+
if (!/^text-\d+\.png$/.test(name))
|
|
121
|
+
throw new RokuHostError("C04_RASTER_PATH", "Invalid temporary raster name");
|
|
122
|
+
const reply = await this.request({
|
|
123
|
+
type: "write",
|
|
124
|
+
name,
|
|
125
|
+
data: encodeBase64(bytes),
|
|
126
|
+
});
|
|
127
|
+
if (!reply.uri?.startsWith("tmp:/react-native-roku-text-"))
|
|
128
|
+
throw new RokuHostError(
|
|
129
|
+
"C04_RASTER_PATH",
|
|
130
|
+
"Native text raster returned an invalid temporary URI",
|
|
131
|
+
);
|
|
132
|
+
return reply.uri;
|
|
133
|
+
}
|
|
134
|
+
async delete(uri: string): Promise<void> {
|
|
135
|
+
await this.request({ type: "delete", uri });
|
|
136
|
+
}
|
|
137
|
+
dispose(): void {
|
|
138
|
+
if (this.disposing || (this.disposalSubmitted && this.listenerDetached)) return;
|
|
139
|
+
this.disposed = true;
|
|
140
|
+
this.disposing = true;
|
|
141
|
+
const failures: unknown[] = [];
|
|
142
|
+
try {
|
|
143
|
+
if (this.current) {
|
|
144
|
+
const pending = this.current;
|
|
145
|
+
this.current = undefined;
|
|
146
|
+
try {
|
|
147
|
+
clearTimeout(pending.timer);
|
|
148
|
+
} catch (error) {
|
|
149
|
+
failures.push(error);
|
|
150
|
+
}
|
|
151
|
+
pending.reject(
|
|
152
|
+
new RokuHostError("C04_RASTER_DISPOSED", "Native text raster transport retired"),
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
try {
|
|
156
|
+
this.batch(() => {
|
|
157
|
+
if (!this.disposalSubmitted)
|
|
158
|
+
try {
|
|
159
|
+
tmTransaction.setProperty(
|
|
160
|
+
this.node,
|
|
161
|
+
"request",
|
|
162
|
+
JSON.stringify({ type: "dispose", id: ++this.sequence }),
|
|
163
|
+
);
|
|
164
|
+
this.disposalSubmitted = true;
|
|
165
|
+
} catch (error) {
|
|
166
|
+
failures.push(error);
|
|
167
|
+
}
|
|
168
|
+
if (!this.listenerDetached)
|
|
169
|
+
try {
|
|
170
|
+
tmTransaction.setProperty(
|
|
171
|
+
this.node,
|
|
172
|
+
"onReply",
|
|
173
|
+
null as unknown as TmValue,
|
|
174
|
+
this.listener as TmValue,
|
|
175
|
+
);
|
|
176
|
+
this.listenerDetached = true;
|
|
177
|
+
} catch (error) {
|
|
178
|
+
failures.push(error);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
} catch (error) {
|
|
182
|
+
failures.push(error);
|
|
183
|
+
}
|
|
184
|
+
} finally {
|
|
185
|
+
this.disposing = false;
|
|
186
|
+
}
|
|
187
|
+
// Submission and observer detachment are separate owned mechanics. Retry
|
|
188
|
+
// only a failed step; neither a failed step nor a late reply reopens input.
|
|
189
|
+
if (failures.length) throw failures[0];
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AbortControllerInstance,
|
|
3
|
+
FetchFunction,
|
|
4
|
+
Request as SdkRequestConstructor,
|
|
5
|
+
RequestMethod,
|
|
6
|
+
ResponseInstance,
|
|
7
|
+
} from "@roku-sdk/interfaces";
|
|
8
|
+
import { RokuHostError } from "./sceneGraph.types";
|
|
9
|
+
import { PortableDOMException, type WebTransport } from "../services/webRuntime";
|
|
10
|
+
|
|
11
|
+
interface NativeWebBindings {
|
|
12
|
+
readonly fetch: FetchFunction;
|
|
13
|
+
readonly Request: SdkRequestConstructor;
|
|
14
|
+
readonly AbortController: new () => AbortControllerInstance;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Capture the firmware bindings before installing the application globals. */
|
|
18
|
+
export function createSdkWebTransport(
|
|
19
|
+
bindings: NativeWebBindings = globalThis as unknown as NativeWebBindings,
|
|
20
|
+
): WebTransport {
|
|
21
|
+
const nativeFetch = bindings.fetch,
|
|
22
|
+
NativeRequest = bindings.Request,
|
|
23
|
+
NativeAbortController = bindings.AbortController;
|
|
24
|
+
return async (request) => {
|
|
25
|
+
if (request.redirect !== undefined && request.redirect !== "follow")
|
|
26
|
+
throw new RokuHostError(
|
|
27
|
+
"C22_FETCH_REDIRECT",
|
|
28
|
+
"Firmware redirect policy cannot be overridden; no request was started",
|
|
29
|
+
);
|
|
30
|
+
// The SDK currently types feature metadata that may be absent on firmware.
|
|
31
|
+
// Capturing the transport must not prevent an offline app from mounting.
|
|
32
|
+
if (
|
|
33
|
+
typeof nativeFetch !== "function" ||
|
|
34
|
+
typeof NativeRequest !== "function" ||
|
|
35
|
+
(typeof nativeFetch.isFeatureSupported === "function" &&
|
|
36
|
+
!nativeFetch.isFeatureSupported("requestInit" as never))
|
|
37
|
+
)
|
|
38
|
+
throw new RokuHostError(
|
|
39
|
+
"C22_FETCH_HOST",
|
|
40
|
+
"Firmware fetch/Request initialization is unavailable",
|
|
41
|
+
);
|
|
42
|
+
if (!["GET", "POST", "PUT", "DELETE", "HEAD", "PATCH"].includes(request.method))
|
|
43
|
+
throw new RokuHostError(
|
|
44
|
+
"C22_FETCH_METHOD",
|
|
45
|
+
"This HTTP method is outside the firmware fetch contract",
|
|
46
|
+
);
|
|
47
|
+
const abortReason = () =>
|
|
48
|
+
request.signal?.reason ?? new PortableDOMException("The operation was aborted", "AbortError");
|
|
49
|
+
if (request.signal?.aborted) throw abortReason();
|
|
50
|
+
let controller: AbortControllerInstance | undefined;
|
|
51
|
+
if (request.signal) {
|
|
52
|
+
try {
|
|
53
|
+
controller = new NativeAbortController();
|
|
54
|
+
} catch {
|
|
55
|
+
throw new RokuHostError(
|
|
56
|
+
"C22_FETCH_ABORT",
|
|
57
|
+
"Firmware request cancellation is unavailable; no request was started",
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
let rejectCancellation!: (reason: unknown) => void;
|
|
62
|
+
const cancelled = new Promise<never>((_, reject) => {
|
|
63
|
+
rejectCancellation = reject;
|
|
64
|
+
});
|
|
65
|
+
// A native binding can abort and throw synchronously before a race attaches.
|
|
66
|
+
void cancelled.catch(() => {});
|
|
67
|
+
const wait = <T>(pending: Promise<T>) =>
|
|
68
|
+
request.signal ? Promise.race([pending, cancelled]) : pending;
|
|
69
|
+
const cancel = () => {
|
|
70
|
+
rejectCancellation(abortReason());
|
|
71
|
+
try {
|
|
72
|
+
controller?.abort("Roku request cancelled");
|
|
73
|
+
} catch {
|
|
74
|
+
// Caller/listener retirement must finish even when firmware cancellation
|
|
75
|
+
// fails. Whether native IO actually stops remains a device observation.
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
request.signal?.addEventListener("abort", cancel, { once: true });
|
|
79
|
+
try {
|
|
80
|
+
if (request.signal?.aborted) {
|
|
81
|
+
cancel();
|
|
82
|
+
throw abortReason();
|
|
83
|
+
}
|
|
84
|
+
const response: ResponseInstance = await wait(
|
|
85
|
+
nativeFetch(
|
|
86
|
+
new NativeRequest(request.url, {
|
|
87
|
+
method: request.method as RequestMethod,
|
|
88
|
+
headers: { ...request.headers },
|
|
89
|
+
body: request.body,
|
|
90
|
+
...(controller ? { signal: controller.signal } : {}),
|
|
91
|
+
}),
|
|
92
|
+
),
|
|
93
|
+
);
|
|
94
|
+
if (request.signal?.aborted) throw abortReason();
|
|
95
|
+
const headers = Object.fromEntries(
|
|
96
|
+
response.headers
|
|
97
|
+
.keys()
|
|
98
|
+
.map((name) => [name.toLowerCase(), response.headers.get(name) ?? ""]),
|
|
99
|
+
);
|
|
100
|
+
const type = headers["content-type"]?.split(";", 1)[0].trim().toLowerCase() ?? "";
|
|
101
|
+
if (
|
|
102
|
+
type &&
|
|
103
|
+
!type.startsWith("text/") &&
|
|
104
|
+
!/^application\/(json|[^;]+\+json|xml|[^;]+\+xml|vnd\.apple\.mpegurl|x-mpegurl)$/.test(type)
|
|
105
|
+
)
|
|
106
|
+
throw new RokuHostError(
|
|
107
|
+
"C22_FETCH_BINARY",
|
|
108
|
+
"Firmware text fetch cannot return this binary response without loss",
|
|
109
|
+
);
|
|
110
|
+
const body = await wait(response.text());
|
|
111
|
+
if (request.signal?.aborted) throw abortReason();
|
|
112
|
+
return {
|
|
113
|
+
status: response.status,
|
|
114
|
+
headers,
|
|
115
|
+
body,
|
|
116
|
+
url: request.url,
|
|
117
|
+
};
|
|
118
|
+
} finally {
|
|
119
|
+
request.signal?.removeEventListener("abort", cancel);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { KeyHandler } from "@roku-sdk/components";
|
|
2
|
+
import {
|
|
3
|
+
createElement,
|
|
4
|
+
createEffect,
|
|
5
|
+
onCleanup,
|
|
6
|
+
onMount,
|
|
7
|
+
tmTransaction,
|
|
8
|
+
type JSX,
|
|
9
|
+
} from "@roku-sdk/solid";
|
|
10
|
+
import { useLifecycle } from "@roku-sdk/runtime/lifecycle";
|
|
11
|
+
import { getAudioGuide } from "@roku-sdk/runtime/audio-guide";
|
|
12
|
+
import { getDeviceInfo } from "@roku-sdk/runtime/device-info";
|
|
13
|
+
import { getAppMemoryMonitor } from "@roku-sdk/runtime/app-memory-monitor";
|
|
14
|
+
import { SdkDeviceFacts } from "./SdkDeviceFacts";
|
|
15
|
+
import { SdkSceneGraph } from "./SdkSceneGraph";
|
|
16
|
+
import { SdkTextMetrics } from "./SdkTextMetrics";
|
|
17
|
+
import { SdkTextRasterTransport } from "./SdkTextRasterTransport";
|
|
18
|
+
import { createSdkDeviceServices } from "./SdkDeviceServices";
|
|
19
|
+
import { createSdkWebTransport } from "./SdkWebTransport";
|
|
20
|
+
import { SdkTextEntry } from "./SdkTextEntry";
|
|
21
|
+
import { TextRasterCache } from "../graphics/TextRasterCache";
|
|
22
|
+
import { RokuKeySession } from "../services/RokuKeySession";
|
|
23
|
+
import { NativeSystemState, type SystemSnapshot } from "../react-native/NativeSystemState";
|
|
24
|
+
|
|
25
|
+
export type {
|
|
26
|
+
RokuHostOptions,
|
|
27
|
+
RokuHostContext,
|
|
28
|
+
MountedRokuApplication,
|
|
29
|
+
RokuHostPhase,
|
|
30
|
+
RokuMemorySnapshot,
|
|
31
|
+
} from "../host/host.types";
|
|
32
|
+
import type { RokuHostOptions, MountedRokuApplication, RokuHostPhase } from "../host/host.types";
|
|
33
|
+
|
|
34
|
+
/** Call inside an SDK defineAnchorNode callback. The consumer keeps its literal
|
|
35
|
+
* anchor/Scene names, application composition and packaged asset configuration. */
|
|
36
|
+
export function createRokuHost(options: RokuHostOptions): JSX.Element {
|
|
37
|
+
const names = options.components;
|
|
38
|
+
if (
|
|
39
|
+
names.TextRasterTask !== "RNRTextRasterTask" ||
|
|
40
|
+
names.DeviceFactsTask !== "RNRDeviceFactsTask"
|
|
41
|
+
)
|
|
42
|
+
throw Error("Native task registration differs from the react-native-roku contract");
|
|
43
|
+
if (!(
|
|
44
|
+
options.viewport.width > 0 &&
|
|
45
|
+
Number.isFinite(options.viewport.width) &&
|
|
46
|
+
options.viewport.height > 0 &&
|
|
47
|
+
Number.isFinite(options.viewport.height)
|
|
48
|
+
))
|
|
49
|
+
throw Error("The Roku viewport must have finite positive dimensions");
|
|
50
|
+
const container = createElement("group"),
|
|
51
|
+
wrapper = createElement("group");
|
|
52
|
+
const control = createElement(names.AppControl),
|
|
53
|
+
raster = createElement(names.TextRaster),
|
|
54
|
+
facts = createElement(names.DeviceFacts);
|
|
55
|
+
const scene = new SdkSceneGraph(container, control),
|
|
56
|
+
keys = new RokuKeySession();
|
|
57
|
+
const textEntry = new SdkTextEntry(control);
|
|
58
|
+
const system = new NativeSystemState({}, (message, options) =>
|
|
59
|
+
getAudioGuide().say(message, options?.queue !== true, true),
|
|
60
|
+
);
|
|
61
|
+
const lifecycle = useLifecycle();
|
|
62
|
+
let application: MountedRokuApplication | undefined,
|
|
63
|
+
disposed = false,
|
|
64
|
+
disposal: Promise<void> | undefined;
|
|
65
|
+
let text: SdkTextMetrics | undefined, textRaster: TextRasterCache | undefined;
|
|
66
|
+
const report = (error: unknown, phase: RokuHostPhase) => {
|
|
67
|
+
const value = error instanceof Error ? error : Error(String(error));
|
|
68
|
+
if (options.onError) options.onError(value, phase);
|
|
69
|
+
else console.error("ROKU_HOST_ERROR", phase, value.message);
|
|
70
|
+
};
|
|
71
|
+
const publish = (snapshot: Partial<SystemSnapshot>) => {
|
|
72
|
+
if (snapshot.appState && snapshot.appState !== "active") keys.reset();
|
|
73
|
+
if (snapshot.appState && snapshot.appState !== "active") textEntry.dismiss();
|
|
74
|
+
if (application) application.publishSystem(snapshot);
|
|
75
|
+
else system.publish(snapshot);
|
|
76
|
+
};
|
|
77
|
+
const deviceFacts = new SdkDeviceFacts(facts, publish, (level) => {
|
|
78
|
+
if (level && level.toLowerCase() !== "normal") system.publishMemoryWarning();
|
|
79
|
+
});
|
|
80
|
+
for (const [params, state, complete] of [
|
|
81
|
+
[() => lifecycle.suspendParams(), "background", () => lifecycle.completeSuspend()],
|
|
82
|
+
[() => lifecycle.resumeParams(), "active", () => lifecycle.completeResume()],
|
|
83
|
+
] as const)
|
|
84
|
+
createEffect(() => {
|
|
85
|
+
if (!params() || disposed) return;
|
|
86
|
+
keys.reset();
|
|
87
|
+
publish({ appState: state });
|
|
88
|
+
// Complete after the SDK's queued Tree transaction has submitted.
|
|
89
|
+
void Promise.resolve().then(complete);
|
|
90
|
+
});
|
|
91
|
+
scene.batch(() => {
|
|
92
|
+
for (const node of [control, raster, facts, container]) tmTransaction.insertNode(wrapper, node);
|
|
93
|
+
});
|
|
94
|
+
const requestExit = () => {
|
|
95
|
+
if (!disposed) scene.batch(() => tmTransaction.setProperty(control, "exitRequested", true));
|
|
96
|
+
};
|
|
97
|
+
const dispose = () =>
|
|
98
|
+
(disposal ??= (async () => {
|
|
99
|
+
disposed = true;
|
|
100
|
+
const failures: unknown[] = [];
|
|
101
|
+
const attempt = (work: () => void) => {
|
|
102
|
+
try {
|
|
103
|
+
work();
|
|
104
|
+
} catch (error) {
|
|
105
|
+
failures.push(error);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
attempt(() => keys.reset());
|
|
109
|
+
attempt(() => publish({ appState: "inactive" }));
|
|
110
|
+
try {
|
|
111
|
+
await application?.dispose();
|
|
112
|
+
} catch (error) {
|
|
113
|
+
failures.push(error);
|
|
114
|
+
}
|
|
115
|
+
attempt(() => scene.cancelFocusSample());
|
|
116
|
+
attempt(() => text?.dispose());
|
|
117
|
+
attempt(() => textRaster?.dispose());
|
|
118
|
+
attempt(() => deviceFacts.dispose());
|
|
119
|
+
attempt(() => textEntry.dispose());
|
|
120
|
+
if (failures.length) throw failures[0];
|
|
121
|
+
})());
|
|
122
|
+
onMount(() => {
|
|
123
|
+
void createSdkDeviceServices({ namespace: options.storageNamespace })
|
|
124
|
+
.then(async (services) => {
|
|
125
|
+
if (disposed) return;
|
|
126
|
+
const device = getDeviceInfo();
|
|
127
|
+
try {
|
|
128
|
+
const facts = await deviceFacts.probe({ video: [], audio: [] });
|
|
129
|
+
if (disposed) return;
|
|
130
|
+
const timeZone = (facts as { timeZone?: unknown } | null)?.timeZone;
|
|
131
|
+
if (typeof timeZone === "string" && timeZone.trim()) system.publish({ timeZone });
|
|
132
|
+
} catch (error) {
|
|
133
|
+
if (disposed) return;
|
|
134
|
+
report(error, "device-facts");
|
|
135
|
+
}
|
|
136
|
+
if (system.getSnapshot().appState === null) system.publish({ appState: "active" });
|
|
137
|
+
text = new SdkTextMetrics(scene, options.fonts);
|
|
138
|
+
textRaster = new TextRasterCache(
|
|
139
|
+
new SdkTextRasterTransport(raster, options.fonts.assets, services.randomUUID()),
|
|
140
|
+
);
|
|
141
|
+
application = options.mount({
|
|
142
|
+
scene,
|
|
143
|
+
system,
|
|
144
|
+
text,
|
|
145
|
+
textRaster,
|
|
146
|
+
services: { ...services, nativeCapabilities: deviceFacts, textEntry },
|
|
147
|
+
webTransport: createSdkWebTransport(),
|
|
148
|
+
svgAtlas: options.svgAtlas,
|
|
149
|
+
requestExit,
|
|
150
|
+
platformVersion: device
|
|
151
|
+
? `${device.osVersion.major}.${device.osVersion.minor}`
|
|
152
|
+
: undefined,
|
|
153
|
+
graphics: {
|
|
154
|
+
effects:
|
|
155
|
+
Number(device?.osVersion.major ?? 0) >= 16 && device?.graphicsPlatform === "opengl",
|
|
156
|
+
composedMasks: device?.graphicsPlatform === "opengl",
|
|
157
|
+
cornerMasks: device?.graphicsPlatform === "opengl" ? options.cornerMasks : undefined,
|
|
158
|
+
},
|
|
159
|
+
viewport: options.viewport,
|
|
160
|
+
});
|
|
161
|
+
await application.whenCommitted();
|
|
162
|
+
if (disposed) return;
|
|
163
|
+
await options.onReady?.({
|
|
164
|
+
device: device
|
|
165
|
+
? {
|
|
166
|
+
model: device.model,
|
|
167
|
+
osVersion: { ...device.osVersion },
|
|
168
|
+
graphicsPlatform: device.graphicsPlatform,
|
|
169
|
+
}
|
|
170
|
+
: null,
|
|
171
|
+
});
|
|
172
|
+
if (options.onMemorySnapshot && !disposed)
|
|
173
|
+
void getAppMemoryMonitor()
|
|
174
|
+
.then((monitor) => {
|
|
175
|
+
if (disposed) return;
|
|
176
|
+
options.onMemorySnapshot?.({
|
|
177
|
+
availableKb: monitor.getChannelAvailableMemory(),
|
|
178
|
+
usagePercent: monitor.getMemoryLimitPercent(),
|
|
179
|
+
limits: monitor.getChannelMemoryLimit(),
|
|
180
|
+
hermesHeap: monitor.getTSHeapInfo(),
|
|
181
|
+
});
|
|
182
|
+
})
|
|
183
|
+
.catch((error) => {
|
|
184
|
+
if (!disposed) report(error, "memory");
|
|
185
|
+
});
|
|
186
|
+
})
|
|
187
|
+
.catch(async (error) => {
|
|
188
|
+
if (!disposed) {
|
|
189
|
+
try {
|
|
190
|
+
await dispose();
|
|
191
|
+
} catch (cleanupError) {
|
|
192
|
+
report(cleanupError, "dispose");
|
|
193
|
+
}
|
|
194
|
+
report(error, "startup");
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
onCleanup(() => {
|
|
199
|
+
void dispose().catch((error) => report(error, "dispose"));
|
|
200
|
+
});
|
|
201
|
+
return KeyHandler({
|
|
202
|
+
handleAllKeys: true,
|
|
203
|
+
children: wrapper as unknown as JSX.Element,
|
|
204
|
+
onKeyEvent(event) {
|
|
205
|
+
if (disposed) return;
|
|
206
|
+
keys.handle(event.key, event.press, (intent) => {
|
|
207
|
+
const handled = application?.remote(intent) ?? false;
|
|
208
|
+
if (!handled && intent.key === "back" && intent.phase === "down") requestExit();
|
|
209
|
+
return handled;
|
|
210
|
+
});
|
|
211
|
+
},
|
|
212
|
+
});
|
|
213
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** The device boundary. A host commit is distinct from observed device presentation. */
|
|
2
|
+
export interface SceneNodeRef {
|
|
3
|
+
readonly id: number;
|
|
4
|
+
readonly type: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export type SceneValue =
|
|
8
|
+
| null
|
|
9
|
+
| boolean
|
|
10
|
+
| number
|
|
11
|
+
| string
|
|
12
|
+
| SceneNodeRef
|
|
13
|
+
| readonly unknown[]
|
|
14
|
+
| Readonly<Record<string, unknown>>;
|
|
15
|
+
export type SceneFields = Readonly<Record<string, SceneValue>>;
|
|
16
|
+
export type SceneFieldListener = (value: unknown) => void;
|
|
17
|
+
|
|
18
|
+
export interface SceneGraphPort {
|
|
19
|
+
readonly root: SceneNodeRef;
|
|
20
|
+
create(type: string): SceneNodeRef;
|
|
21
|
+
set(node: SceneNodeRef, field: string, value: SceneValue): void;
|
|
22
|
+
insert(parent: SceneNodeRef, child: SceneNodeRef, before?: SceneNodeRef): void;
|
|
23
|
+
remove(parent: SceneNodeRef, child: SceneNodeRef): void;
|
|
24
|
+
subscribe(node: SceneNodeRef, field: string, listener: SceneFieldListener): () => void;
|
|
25
|
+
batch(work: () => void): void;
|
|
26
|
+
/** Optional native readback after a focus event was missed. */
|
|
27
|
+
sampleFocus?(nodes: readonly SceneNodeRef[], receive: (node: SceneNodeRef) => void): void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export class RokuHostError extends Error {
|
|
31
|
+
constructor(
|
|
32
|
+
readonly code: string,
|
|
33
|
+
message: string,
|
|
34
|
+
) {
|
|
35
|
+
super(`[Roku ${code}] ${message}`);
|
|
36
|
+
this.name = "RokuHostError";
|
|
37
|
+
}
|
|
38
|
+
}
|