Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add obs-websocket 5.0.0 integration #340

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

tt2468
Copy link
Member

@tt2468 tt2468 commented Dec 30, 2021

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.

Copy link
Member

@WizardCM WizardCM left a comment

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 Enhancement New feature or improvement 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.
@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
Enhancement New feature or improvement
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

3 participants