{"id":23703382,"url":"https://github.com/studimax/streamboard-sdk","last_synced_at":"2026-01-31T04:30:17.321Z","repository":{"id":37183293,"uuid":"332899051","full_name":"studimax/streamboard-sdk","owner":"studimax","description":"StreamBoard SDK is an SDK to create plugin for the Stream Board","archived":false,"fork":false,"pushed_at":"2023-03-05T22:28:47.000Z","size":1051,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T05:43:00.132Z","etag":null,"topics":["plugin","sdk","stream-board","streamboard","streamboard-sdk","studimax"],"latest_commit_sha":null,"homepage":"https://stream-board.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/studimax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-25T22:14:32.000Z","updated_at":"2021-08-06T12:01:04.000Z","dependencies_parsed_at":"2024-10-19T08:48:39.360Z","dependency_job_id":"3251976d-2727-480d-9b48-7af7fa840cba","html_url":"https://github.com/studimax/streamboard-sdk","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studimax%2Fstreamboard-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studimax%2Fstreamboard-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studimax%2Fstreamboard-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studimax%2Fstreamboard-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/studimax","download_url":"https://codeload.github.com/studimax/streamboard-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239780142,"owners_count":19695736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["plugin","sdk","stream-board","streamboard","streamboard-sdk","studimax"],"created_at":"2024-12-30T13:02:36.671Z","updated_at":"2026-01-31T04:30:17.248Z","avatar_url":"https://github.com/studimax.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\" style=\"margin: 0\"\u003e\n  \u003ca href=\"https://stream-board.app/\" target=\"blank\"\u003e\u003cimg src=\"https://stream-board.app/logo.svg\" width=\"175\" alt=\"StreamBoard Logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\" style=\"margin-top: 0\"\u003eStream Board SDK\u003c/h1\u003e\n\n![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/studimax/streamboard-sdk/CodeQL)\n[![npm](https://img.shields.io/npm/v/streamboard-sdk)](https://www.npmjs.com/package/streamboard-sdk)\n[![Code Style: Google](https://img.shields.io/badge/code%20style-google-blueviolet.svg?logo=google\u0026logoColor=white)](https://github.com/google/gts)\n[![Code: TypeScript](https://img.shields.io/badge/made%20with-typescript-blue.svg?logo=typescript\u0026logoColor=white)](https://github.com/microsoft/TypeScript)\n[![Made By: StudiMax](https://img.shields.io/badge/made%20by-studimax-red.svg)](https://github.com/studimax)\n\nThis project is the **official** SDK for the Stream Board project.\n\nThe SDK is helpful to develop some plugins as easy as possible and as fast as possible.\n\n## Installation\n\n```bash\n$ npm install streamboard-sdk\nOR\n$ yarn add streamboard-sdk\n```\n\n## Example\n\nThen you can use the sdk like this example\n\n```js\nimport StreamBoardSDK from \"stremboard-sdk\";\n\nconst sdk = new StreamBoardSDK();\n\nsdk.setActionConfig('myaction', [\n  { type: 'input_text', key: 'world', default: () =\u003e 'World' },\n]);\n\nsdk.onContext('myaction', context =\u003e {\n  context.setText(\"Hello\");\n  context.setColor(\"#1452bc\");\n\n  context.onPressDown(async () =\u003e {\n    const config = await context.getConfig();\n\n    context.setText(`Hello ${config.world}`);\n    context.setColor(\"#14bc30\");\n  });\n});\n\nsdk.ready();\n```\n\n### Package.json\n\nThe plugin need a valid package.json with this minimum configuration:\n\n```json\n{\n  \"name\": \"simple-plugin\",\n  \"version\": \"1.0.0\",\n  \"main\": \"src/index.ts\",\n  \"icon\": \"assets/img/icon.png\",\n  \"identifier\": \"ch.studimax.simple-plugin\",\n  \"actions\": {\n    \"myaction\": {\n      \"name\": \"Test\",\n      \"icon\": \"assets/img/actions/test.png\"\n    }\n  },\n  \"engines\": {\n    \"node\": \"\u003e=14.16.0\"\n  }\n}\n```\n\n### Context\n\nThe plugin is executed one time on the StreamBoard, so there is only one instance of the plugin. That's why we need to\nuse context. Context is an instance of a plugin's action declared in package.json.\n\n#### setText(value:string)\n\n```js\ncontext.setText(\"text\");\n```\n\n#### setImage(src:string)\n\nsrc is an absolute URL.\n\n```js\ncontext.setImage(\"https://media.giphy.com/media/xT4uQl1oBYev1vaRos/giphy.gif\");\n```\n\n#### setColor(color:string)\n\ncolor is a valid CSS color.\n\n```js\ncontext.setColor(\"#ff0000\");\n```\n\n### Context Events\n\n#### onPressDown\n\nGot this event when icon is pressed down.\n\n```js\ncontext.onPressDown(() =\u003e {\n  console.log('press down');\n})\n```\n\n#### onPressUp\n\nGot this event when icon is pressed up. You can get the press duration with `pressDuration`\n\n```js\ncontext.onPressUp(({ pressDuration }) =\u003e {\n  console.log('press up');\n})\n```\n\n#### onStop\n\nGot this event when the context is stopped.\n\n```js\ncontext.onStop(() =\u003e {\n  console.log('stop');\n})\n```\n\n#### onSettings\n\nGot this event when the context's config changed.\n\n```js\ncontext.onSettings(config =\u003e {\n  console.log(config);\n})\n```\n\n### Get all contexts\n\n```js\n//get all contexts\nconst contexts = sdk.getAllContexts();\n\n//get all contexts with action named \"action\"\nconst contexts = sdk.getAllContexts(\"action\");\n```\n\n### onContext\n\nonContext is executed when a new context is added on StreamBoard, the context instance and the config are returned.\n\n```js\nsdk.onContext((context, config) =\u003e {\n  console.log(context);\n})\n```\n\n## Done\n\nEt voilà - we created a simple plugin. Don't forget that this project is in development.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudimax%2Fstreamboard-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstudimax%2Fstreamboard-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudimax%2Fstreamboard-sdk/lists"}