obsproject / obs-browser

CEF-based OBS Studio browser plugin
GNU General Public License v2.0
776 stars 220 forks source link

Add obs-websocket 5.0.0 integration #340

Closed tt2468 closed 2 years ago

tt2468 commented 2 years ago

Description

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

Vendor requests:

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

Checklist:

NASCARundertakerfan92 commented 10 months ago

Twitch streamers