{"id":13562031,"url":"https://github.com/obsproject/obs-browser","last_synced_at":"2025-05-16T08:05:32.265Z","repository":{"id":20098327,"uuid":"23367815","full_name":"obsproject/obs-browser","owner":"obsproject","description":"CEF-based OBS Studio browser plugin","archived":false,"fork":false,"pushed_at":"2025-05-12T20:33:30.000Z","size":991,"stargazers_count":824,"open_issues_count":49,"forks_count":234,"subscribers_count":65,"default_branch":"master","last_synced_at":"2025-05-15T09:40:38.865Z","etag":null,"topics":["c","c-plus-plus","cef","obs-studio"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/obsproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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,"zenodo":null}},"created_at":"2014-08-26T21:42:58.000Z","updated_at":"2025-05-12T20:33:34.000Z","dependencies_parsed_at":"2023-02-14T12:47:24.557Z","dependency_job_id":"5dbf9db0-ea61-4ee6-be3d-1b82fa5f759c","html_url":"https://github.com/obsproject/obs-browser","commit_stats":{"total_commits":559,"total_committers":55,"mean_commits":"10.163636363636364","dds":0.7316636851520573,"last_synced_commit":"b4f724ae6abd371f8f0378f29c908f51065190f3"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obsproject%2Fobs-browser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obsproject%2Fobs-browser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obsproject%2Fobs-browser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obsproject%2Fobs-browser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/obsproject","download_url":"https://codeload.github.com/obsproject/obs-browser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493378,"owners_count":22080126,"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":["c","c-plus-plus","cef","obs-studio"],"created_at":"2024-08-01T13:01:03.807Z","updated_at":"2025-05-16T08:05:32.210Z","avatar_url":"https://github.com/obsproject.png","language":"C++","readme":"# obs-browser\n\nobs-browser introduces a cross-platform Browser Source, powered by CEF ([Chromium Embedded Framework](https://bitbucket.org/chromiumembedded/cef/src/master/README.md)), to OBS Studio. A Browser Source allows the user to integrate web-based overlays into their scenes, with complete access to modern web APIs.\n\nAdditionally, obs-browser enables Service Integration (linking third party services) and Browser Docks (webpages loaded into the interface itself) on all supported platforms, except for Wayland (Linux).\n\n**This plugin is included by default** on official packages on Windows, macOS, the Ubuntu PPA and the official [Flatpak](https://flathub.org/apps/details/com.obsproject.Studio) (most Linux distributions).\n\n## JS Bindings\n\nobs-browser provides a global object that allows access to some OBS-specific functionality from JavaScript. This can be used to create an overlay that adapts dynamically to changes in OBS.\n\n### TypeScript Type Definitions\n\nIf you're using TypeScript, type definitions for the obs-browser bindings are available through npm and yarn.\n\n```sh\n# npm\nnpm install --save-dev @types/obs-studio\n\n# yarn\nyarn add --dev @types/obs-studio\n```\n\n### Get Browser Plugin Version\n\n```js\n/**\n * @returns {string} OBS Browser plugin version\n */\nwindow.obsstudio.pluginVersion\n// =\u003e 2.17.0\n```\n\n### Register for event callbacks\n\n```js\n/**\n * @callback EventListener\n * @param {CustomEvent} event\n */\n\n/**\n * @param {string} type\n * @param {EventListener} listener\n */\nwindow.addEventListener('obsSceneChanged', function(event) {\n\tvar t = document.createTextNode(event.detail.name)\n\tdocument.body.appendChild(t)\n})\n```\n\n#### Available events\n\nDescriptions for these events can be [found here](https://obsproject.com/docs/reference-frontend-api.html?highlight=paused#c.obs_frontend_event).\n\n* obsSceneChanged\n* obsSceneListChanged\n* obsTransitionChanged\n* obsTransitionListChanged\n* obsSourceVisibleChanged\n* obsSourceActiveChanged\n* obsStreamingStarting\n* obsStreamingStarted\n* obsStreamingStopping\n* obsStreamingStopped\n* obsRecordingStarting\n* obsRecordingStarted\n* obsRecordingPaused\n* obsRecordingUnpaused\n* obsRecordingStopping\n* obsRecordingStopped\n* obsReplaybufferStarting\n* obsReplaybufferStarted\n* obsReplaybufferSaved\n* obsReplaybufferStopping\n* obsReplaybufferStopped\n* obsVirtualcamStarted\n* obsVirtualcamStopped\n* obsExit\n* [Any custom event emitted via obs-websocket vendor requests]\n\n\n### Control OBS\n#### Get webpage control permissions\nPermissions required: NONE\n```js\n/**\n * @typedef {number} Level - The level of permissions. 0 for NONE, 1 for READ_OBS (OBS data), 2 for READ_USER (User data), 3 for BASIC, 4 for ADVANCED and 5 for ALL\n */\n\n/**\n * @callback LevelCallback\n * @param {Level} level\n */\n\n/**\n * @param {LevelCallback} cb - The callback that receives the current control level.\n */\nwindow.obsstudio.getControlLevel(function (level) {\n    console.log(level)\n})\n```\n\n#### Get OBS output status\nPermissions required: READ_OBS\n```js\n/**\n * @typedef {Object} Status\n * @property {boolean} recording - not affected by pause state\n * @property {boolean} recordingPaused\n * @property {boolean} streaming\n * @property {boolean} replaybuffer\n * @property {boolean} virtualcam\n */\n\n/**\n * @callback StatusCallback\n * @param {Status} status\n */\n\n/**\n * @param {StatusCallback} cb - The callback that receives the current output status of OBS.\n */\nwindow.obsstudio.getStatus(function (status) {\n\tconsole.log(status)\n})\n```\n\n#### Get the current scene\nPermissions required: READ_USER\n```js\n/**\n * @typedef {Object} Scene\n * @property {string} name - name of the scene\n * @property {number} width - width of the scene\n * @property {number} height - height of the scene\n */\n\n/**\n * @callback SceneCallback\n * @param {Scene} scene\n */\n\n/**\n * @param {SceneCallback} cb - The callback that receives the current scene in OBS.\n */\nwindow.obsstudio.getCurrentScene(function(scene) {\n    console.log(scene)\n})\n```\n\n#### Get scenes\nPermissions required: READ_USER\n```js\n/**\n * @callback ScenesCallback\n * @param {string[]} scenes\n */\n\n/**\n * @param {ScenesCallback} cb - The callback that receives the scenes.\n */\nwindow.obsstudio.getScenes(function (scenes) {\n    console.log(scenes)\n})\n```\n\n#### Get transitions\nPermissions required: READ_USER\n```js\n/**\n * @callback TransitionsCallback\n * @param {string[]} transitions\n */\n\n/**\n * @param {TransitionsCallback} cb - The callback that receives the transitions.\n */\nwindow.obsstudio.getTransitions(function (transitions) {\n    console.log(transitions)\n})\n```\n\n#### Get current transition\nPermissions required: READ_USER\n```js\n/**\n * @callback TransitionCallback\n * @param {string} transition\n */\n\n/**\n * @param {TransitionCallback} cb - The callback that receives the transition currently set.\n */\nwindow.obsstudio.getCurrentTransition(function (transition) {\n    console.log(transition)\n})\n```\n\n#### Save the Replay Buffer\nPermissions required: BASIC\n```js\n/**\n * Does not accept any parameters and does not return anything\n */\nwindow.obsstudio.saveReplayBuffer()\n```\n\n#### Start the Replay Buffer\nPermissions required: ADVANCED\n```js\n/**\n * Does not accept any parameters and does not return anything\n */\nwindow.obsstudio.startReplayBuffer()\n```\n\n#### Stop the Replay Buffer\nPermissions required: ADVANCED\n```js\n/**\n * Does not accept any parameters and does not return anything\n */\nwindow.obsstudio.stopReplayBuffer()\n```\n\n#### Change scene\nPermissions required: ADVANCED\n```js\n/**\n * @param {string} name - Name of the scene\n */\nwindow.obsstudio.setCurrentScene(name)\n```\n\n#### Set the current transition\nPermissions required: ADVANCED\n```js\n/**\n * @param {string} name - Name of the transition\n */\nwindow.obsstudio.setCurrentTransition(name)\n```\n\n#### Start streaming\nPermissions required: ALL\n```js\n/**\n * Does not accept any parameters and does not return anything\n */\nwindow.obsstudio.startStreaming()\n```\n\n#### Stop streaming\nPermissions required: ALL\n```js\n/**\n * Does not accept any parameters and does not return anything\n */\nwindow.obsstudio.stopStreaming()\n```\n\n#### Start recording\nPermissions required: ALL\n```js\n/**\n * Does not accept any parameters and does not return anything\n */\nwindow.obsstudio.startRecording()\n```\n\n#### Stop recording\nPermissions required: ALL\n```js\n/**\n * Does not accept any parameters and does not return anything\n */\nwindow.obsstudio.stopRecording()\n```\n\n#### Pause recording\nPermissions required: ALL\n```js\n/**\n * Does not accept any parameters and does not return anything\n */\nwindow.obsstudio.pauseRecording()\n```\n\n#### Unpause recording\nPermissions required: ALL\n```js\n/**\n * Does not accept any parameters and does not return anything\n */\nwindow.obsstudio.unpauseRecording()\n```\n\n#### Start the Virtual Camera\nPermissions required: ALL\n```js\n/**\n * Does not accept any parameters and does not return anything\n */\nwindow.obsstudio.startVirtualcam()\n```\n\n#### Stop the Virtual Camera\nPermissions required: ALL\n```js\n/**\n * Does not accept any parameters and does not return anything\n */\nwindow.obsstudio.stopVirtualcam()\n```\n\n\n### Register for visibility callbacks\n\n**This method is legacy. Register an event listener instead.**\n\n```js\n/**\n * onVisibilityChange gets callbacks when the visibility of the browser source changes in OBS\n *\n * @deprecated\n * @see obsSourceVisibleChanged\n * @param {boolean} visibility - True -\u003e visible, False -\u003e hidden\n */\nwindow.obsstudio.onVisibilityChange = function(visibility) {\n\n};\n```\n\n### Register for active/inactive callbacks\n\n**This method is legacy. Register an event listener instead.**\n\n```js\n/**\n * onActiveChange gets callbacks when the active/inactive state of the browser source changes in OBS\n *\n * @deprecated\n * @see obsSourceActiveChanged\n * @param {bool} True -\u003e active, False -\u003e inactive\n */\nwindow.obsstudio.onActiveChange = function(active) {\n\n};\n```\n\n### obs-websocket Vendor\nobs-browser includes integration with obs-websocket's Vendor requests. The vendor name to use is `obs-browser`, and available requests are:\n\n- `emit_event` - Takes `event_name` and ?`event_data` parameters. Emits a custom event to all browser sources. To subscribe to events, see [here](#register-for-event-callbacks)\n  - See [#340](https://github.com/obsproject/obs-browser/pull/340) for example usage.\n\nThere are no available vendor events at this time.\n\n## Building\n\nOBS Browser cannot be built standalone. It is built as part of OBS Studio.\n\nBy following the instructions, this will enable Browser Source \u0026 Custom Browser Docks on all three platforms. Both `BUILD_BROWSER` and `CEF_ROOT_DIR` are required.\n\n### On Windows\n\nFollow the [build instructions](https://obsproject.com/wiki/Install-Instructions#windows-build-directions) and be sure to download the **CEF Wrapper** and set `CEF_ROOT_DIR` in CMake to point to the extracted wrapper.\n\n### On macOS\n\nUse the [macOS Full Build Script](https://obsproject.com/wiki/Install-Instructions#macos-build-directions). This will automatically download \u0026 enable OBS Browser.\n\n### On Linux\n\nFollow the [build instructions](https://obsproject.com/wiki/Install-Instructions#linux-build-directions) and choose the \"If building with browser source\" option. This includes steps to download/extract the CEF Wrapper, and set the required CMake variables.\n","funding_links":[],"categories":["C++","Setting up OBS Studio"],"sub_categories":["Useful OBS Studio 3rd party plugins and themes."],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobsproject%2Fobs-browser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobsproject%2Fobs-browser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobsproject%2Fobs-browser/lists"}