This is the Chef application of the Sofie TV Automation System. It is a small Electron app, used to display web pages in fullscreen-, borderless- or usual windows.
The intended use to display HTML graphics, video, and camera inputs with low latency directly out to a TV studio screen.
Windows & Linux: Download and install the latest release from Releases.
When the application first starts, a config.json
-file is created in the users home catalog (on windows, that's C:\Users\MY_USER\AppData\Roaming\sofie-chef\sofie-chef\config.json).
To open the config.json
-file, click CTRL Alt SHIFT C
.
When the config.json
-file is edited, the application applies the changes instantly.
Most properties of the config.json
-file are also automatically updated when moving or resizing the windows.
CTRL Alt SHIFT F
Toggles fullscreen for the current (or last) selected windowCTRL Alt SHIFT I
Toggles DevTools (console) for the current (or last) selected windowCTRL Alt SHIFT C
Opens the config file in the system default editorCTRL Alt SHIFT N
Creates a new windowCTRL Alt SHIFT W
Closes and removes the window
See config.ts
Here are some tips for when you want to display something in fullscreen and want to avoid ANY overlays on top of the content (like popups).
- In the config file, set:
{ "fullScreen": true, // Display in fullscreen "onTop": true // Display on top of other windows (and popups when in fullscreen mode) }
- Put the fullscreen window on a non-main display. If the content is on the primary display, an accidental click on the Windows key will open the Windows Start menu which will display on top of the output.
See types here for messages over websocket: src/lib/api.ts
The API is exposed by default on http://localhost:5270
Note: If apiKey
is set in config.json, all requests must include ?apiKey=API_KEY
URL | Parameters | Description |
---|---|---|
GET /api/status |
Current status | |
PUT /api/playURL/:windowId |
Body parameters: |
Display web page |
PUT /api/restart/:windowId |
Reload the web player | |
PUT /api/stop/:windowId |
Stop and clear the web player | |
PUT /api/execute/:windowId |
Body parameters: |
Execute javascript in web player |
GET /api/list |
List windows | |
GET /api |
List API calls |
yarn dev # or npm run dev
yarn build:binary
If needed, the web page rendered inside Sofie Chef can be made aware that they are running inside by looking at the userAgent.
if (window.navigator.userAgent.match('sofie-chef')) console.log("I'm running inside Sofie Chef!")
The web page can also report various statuses to the renderer:
if (window.reportChefStatus) {
window.reportChefStatus('good')
window.reportChefStatus('good', 'Nothing to see here')
window.reportChefStatus('warning', "Unable to load the correct font, but I'll manage...")
window.reportChefStatus('error', 'Unable to load the video XYZ')
}
When enabled via the apiPort
-property in the config.json
file, Sofie Chef exposes a HTTP REST and a Websockets API.
The HTTP REST API is exposed on the port apiPort
. A list of methods can be found at localhost:apiPort/api.
The Websockets API is exposed on the port apiPort 1
. A description of the data-interchange can be found here: api.ts
yarn release
- Push the branch (and tag!) to GitHub
- Wait for the Github Action to finish building the binaries.
- Go to Releases and publish the release draft.
The NRK logo is a registered trademark of Norsk rikskringkasting AS. The license does not grant any right to use, in any way, any trademarks, service marks or logos of Norsk rikskringkasting AS.