Skip to content

Add obs-websocket 5.0.0 integration#340

Merged
WizardCM merged 1 commit into
obsproject:masterfrom
tt2468:feature/obs-websocket-lib
Jan 10, 2022
Merged

Add obs-websocket 5.0.0 integration#340
WizardCM merged 1 commit into
obsproject:masterfrom
tt2468:feature/obs-websocket-lib

Conversation

@tt2468

@tt2468 tt2468 commented Dec 30, 2021

Copy link
Copy Markdown
Member

Description

This adds integration into obs-websocket's new plugin API. The vendor name registered is obs-browser.

Vendor requests:

  • emit_event - Takes event_name and ?event_data parameters. Emits a custom event to all browser sources.

Motivation and Context

Integration between obs-browser and obs-websocket is a great proof of concept for our API and should serve as a great example for third-party plugin developers.

How Has This Been Tested?

Tested by sending a request to obs-websocket and listening for the event in a test HTML page.

Request:
image

Test HTML Page:

<!DOCTYPE html>

<script type="text/javascript">
  window.addEventListener('obs-websocket-test-event', function(event) {
    console.log(event.detail)
  })
</script>

Result in dev tools:
image

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@WizardCM WizardCM left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to respect ControlLevel. I do like the idea of supporting this though.

@WizardCM WizardCM added the kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. label Jan 7, 2022
@tt2468
tt2468 force-pushed the feature/obs-websocket-lib branch 2 times, most recently from 9904eec to 599dab5 Compare January 9, 2022 22:46
This adds integration into obs-websocket's new plugin API. The vendor
name registered is `obs-browser`.

Added vendor requests:
- `emit_event` - Takes `event_name` and ?`event_data` parameters. Emits a custom event to all browser sources.
@tt2468
tt2468 force-pushed the feature/obs-websocket-lib branch from 599dab5 to ab19104 Compare January 9, 2022 22:54
@WizardCM
WizardCM merged commit 26dc85e into obsproject:master Jan 10, 2022
@tt2468
tt2468 deleted the feature/obs-websocket-lib branch January 10, 2022 21:15
@NASCARundertakerfan92

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

4 participants