Skip to content

Commit 3ba3ba4

Browse files
committed
Fixed review comments
1 parent 01d4051 commit 3ba3ba4

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

docs/README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# RdkNativeScript
22

3-
rdkNativeScript is a JavaScript runtime component in the RDK middleware that enables native execution of JavaScript applications directly on RDK-V devices, outside of a full browser environment. It provides a lightweight, embeddable runtime that exposes device capabilities — such as media playback, networking, and display — to JavaScript applications through a set of controlled API bindings. The component is deployed as a Thunder plugin with the callsign `org.rdk.jsruntime` and can be cloned to create multiple independent runtime instances.
3+
rdkNativeScript is a JavaScript runtime component in the RDK middleware that enables native execution of JavaScript applications directly on RDKE/RDKV devices, outside of a full browser environment. It provides a lightweight, embeddable runtime that exposes device capabilities — such as media playback, networking, and display — to JavaScript applications through a set of controlled API bindings. The component is deployed as a Thunder plugin with the callsign `org.rdk.jsruntime` and can be cloned to create multiple independent runtime instances.
44

55
At the device level, rdkNativeScript allows non-browser JavaScript applications such as lightweight widgets and streaming clients to run with native-level access to media pipelines, WebSocket communication, and the Wayland display stack. It bridges the gap between JavaScript application logic and low-level device capabilities without requiring a full web engine.
66

@@ -127,11 +127,11 @@ graph TD
127127
- **Synchronization**: `NativeJSRenderer` protects the context map with `mUserMutex`. The console state uses `isProcessing_cv` (condition variable + mutex) for producer/consumer coordination of queued scripts. `JSRuntimeServer` protects the connection set with `mDataMutex`. `JSRuntimeClient` uses `mResponseMutex` and `mResponseCondition` with a 5-second wait-for-response timeout.
128128
- **Async / Event Dispatch**: Key events from Essos are dispatched synchronously into the registered `JavaScriptKeyListener` (the active context). Timer callbacks and deferred JS execution are scheduled through the GLib main loop rather than blocking caller threads.
129129

130-
### RDK-V Platform and Integration Requirements
130+
### RDKE/RDKV Platform and Integration Requirements
131131

132132
- **Build Dependencies**: westeros, essos, rapidjson, rtcore, libuv, gstreamer1.0, uwebsockets, JavaScriptCore, websocketpp, cjson, boost, virtual/egl. When container widget support is enabled, dobby is additionally required.
133133
- **Plugin Dependencies**: The AAMP media player library (`libaampjsbindings.so`) must be present at the target library path when dynamic AAMP bindings are enabled.
134-
- **Device Services / HAL**: Essos HAL for Wayland compositor abstraction and keyboard input; GStreamer 1.0 for media pipeline initialization.
134+
- **HAL**: Essos HAL for Wayland compositor abstraction and keyboard input; GStreamer 1.0 for media pipeline initialization.
135135
- **Systemd Services**: A running Wayland compositor (Westeros) must be available when Essos integration is enabled and a display is requested.
136136

137137
### Module Settings
@@ -281,18 +281,18 @@ sequenceDiagram
281281

282282
### Interaction Matrix
283283

284-
| Target Component / Layer | Interaction Purpose | Key APIs / Topics |
285-
| ------------------------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
286-
| **Plugins** | | |
287-
| `Thunder` | Plugin activation, JSON-RPC method dispatch, plugin cloning | `Controller.1.clone`, `Controller.1.activate`, `launchApplication` |
288-
| **Device Services / HAL** | | |
289-
| Essos | Wayland display initialization and keyboard input routing | `EssContextCreate`, `EssContextSetKeyListener`, `EssContextStart` |
290-
| GStreamer | Media pipeline subsystem initialization required for AAMP playback | `gst_init()` |
291-
| AAMP JS Bindings | Media playback control exposed as `AAMPMediaPlayer` in JavaScript | `AAMPPlayer_LoadJS()`, `AAMPPlayer_UnloadJS()` (dynamic: `libaampjsbindings.so`) |
292-
| libcurl | Remote script file download by URL before evaluation | `curl_easy_perform`, write callbacks |
293-
| **External Systems** | | |
294-
| WebSocket Server (self) | External tools and container clients send application control commands | WebSocket JSON messages: `launchApplication`, `createApplication`, `terminateApplication` |
295-
| Remote Inspector | JavaScript debugger connection over network | `JSRemoteInspectorStart()`, env `NATIVEJS_INSPECTOR_SERVER` |
284+
| Target Component / Layer | Interaction Purpose | Key APIs / Topics |
285+
| ------------------------ | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
286+
| **Plugins** | | |
287+
| `Thunder` | Plugin activation, JSON-RPC method dispatch, plugin cloning | `Controller.1.clone`, `Controller.1.activate`, `launchApplication` |
288+
| **HAL** | | |
289+
| Essos | Wayland display initialization and keyboard input routing | `EssCtxCreate`, `EssCtxSetKeyboardListener`, `EssCtxStart` |
290+
| GStreamer | Media pipeline subsystem initialization required for AAMP playback | `gst_init()` |
291+
| AAMP JS Bindings | Media playback control exposed as `AAMPMediaPlayer` in JavaScript | `AAMPPlayer_LoadJS()`, `AAMPPlayer_UnloadJS()` (dynamic: `libaampjsbindings.so`) |
292+
| libcurl | Remote script file download by URL before evaluation | `curl_easy_perform`, write callbacks |
293+
| **External Systems** | | |
294+
| WebSocket Server (self) | External tools and container clients send application control commands | WebSocket JSON messages: `launchApplication`, `createApplication`, `terminateApplication` |
295+
| Remote Inspector | JavaScript debugger connection over network | `JSRemoteInspectorStart()`, env `NATIVEJS_INSPECTOR_SERVER` |
296296

297297
### Events Published
298298

@@ -324,14 +324,14 @@ sequenceDiagram
324324

325325
## Implementation Details
326326

327-
### Major HAL APIs Integration
327+
### Key External API Integrations
328328

329-
| HAL / DS API | Purpose | Implementation File |
329+
| API | Purpose | Implementation File |
330330
| ------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------- |
331-
| `EssContextCreate()` | Creates an Essos compositor context | `src/EssosInstance.cpp` |
332-
| `EssContextSetTerminateListener()` | Registers a termination callback with the compositor | `src/EssosInstance.cpp` |
333-
| `EssContextSetKeyListener()` | Registers a keyboard input callback for key press and release events | `src/EssosInstance.cpp` |
334-
| `EssContextStart()` | Starts the Essos event loop, connecting to the Wayland display | `src/EssosInstance.cpp` |
331+
| `EssCtxCreate()` | Creates an Essos compositor context | `src/EssosInstance.cpp` |
332+
| `EssCtxSetTerminateListener()` | Registers a termination callback with the compositor | `src/EssosInstance.cpp` |
333+
| `EssCtxSetKeyboardListener()` | Registers a keyboard input callback for key press and release events | `src/EssosInstance.cpp` |
334+
| `EssCtxStart()` | Starts the Essos event loop, connecting to the Wayland display | `src/EssosInstance.cpp` |
335335
| `gst_init()` | Initializes the GStreamer framework before any pipeline creation | `src/jsc/JavaScriptEngine.cpp` |
336336
| `AAMPPlayer_LoadJS()` | Loads AAMP JS bindings into a JSC global context (static mode) | `src/jsc/JavaScriptContext.cpp` |
337337
| `AAMPPlayer_UnloadJS()` | Unloads AAMP JS bindings from a JSC global context (static mode) | `src/jsc/JavaScriptContext.cpp` |

0 commit comments

Comments
 (0)