All Projects → Twasi → Websocket Obs Java

Twasi / Websocket Obs Java

Licence: mit
A java library for the OBS-Studio websocket plugin by Palakis.

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Websocket Obs Java

Nginx Luajit Ws
nginx + nginx-luajit + websocket
Stars: ✭ 19 (-32.14%)
Mutual labels:  websocket
Clusterws
💥 Lightweight, fast and powerful framework for building scalable WebSocket applications in Node.js
Stars: ✭ 868 (+3000%)
Mutual labels:  websocket
Netty Websocket Spring Boot Starter
🚀 lightweight high-performance WebSocket framework ( 轻量级、高性能的WebSocket框架)
Stars: ✭ 885 (+3060.71%)
Mutual labels:  websocket
Erlach
☣⚫⚫ SPA Imageboad on WebSockets written on Erlang
Stars: ✭ 23 (-17.86%)
Mutual labels:  websocket
Awesome Websockets
A curated list of Websocket libraries and resources.
Stars: ✭ 850 (+2935.71%)
Mutual labels:  websocket
Angular Chat
(IM App)Chat App built using Angular and Socket.io
Stars: ✭ 12 (-57.14%)
Mutual labels:  websocket
Go jwt
golang for websocket wechat or weixin and jwt,http ratelimit
Stars: ✭ 19 (-32.14%)
Mutual labels:  websocket
Imbygo
一个基于melody+gin+goredis+gorm的websocket聊天架构,利用redis实现支持分布式部署
Stars: ✭ 21 (-25%)
Mutual labels:  websocket
Web Msg Sender
Web message pusher written in PHP based on workerman.
Stars: ✭ 864 (+2985.71%)
Mutual labels:  websocket
Esp Rfid
ESP8266 RFID (RC522, PN532, Wiegand, RDM6300) Access Control system featuring WebSocket, JSON, NTP Client, Javascript, SPIFFS
Stars: ✭ 881 (+3046.43%)
Mutual labels:  websocket
Rocketengine
🚀 支持流式读写的 WebSocket 库
Stars: ✭ 25 (-10.71%)
Mutual labels:  websocket
Gowebsocket
golang基于websocket单台机器支持百万连接分布式聊天(IM)系统
Stars: ✭ 937 (+3246.43%)
Mutual labels:  websocket
Websock3ds
Example websocket server for Nintendo 3DS
Stars: ✭ 13 (-53.57%)
Mutual labels:  websocket
Alpaca Trade Api Python
Python client for Alpaca's trade API
Stars: ✭ 912 (+3157.14%)
Mutual labels:  websocket
Treefrog Framework
TreeFrog Framework : High-speed C++ MVC Framework for Web Application
Stars: ✭ 885 (+3060.71%)
Mutual labels:  websocket
Kafka2websocket
Read Kafka topics with WebSockets
Stars: ✭ 19 (-32.14%)
Mutual labels:  websocket
Much Assembly Required
Assembly programming game
Stars: ✭ 869 (+3003.57%)
Mutual labels:  websocket
Hoppscotch
👽 Open source API development ecosystem https://hoppscotch.io
Stars: ✭ 34,569 (+123360.71%)
Mutual labels:  websocket
Chatroom
go语言实现的简单聊天室(WebSocket方式)
Stars: ✭ 20 (-28.57%)
Mutual labels:  websocket
Deepstream.io
deepstream.io server
Stars: ✭ 6,947 (+24710.71%)
Mutual labels:  websocket

websocket-obs-java

A java library for the OBS-Studio websocket plugin by Palakis.


Getting started

First include the library in your project using Maven:

<!-- https://mvnrepository.com/artifact/net.twasi/obs-websocket-java -->
<dependency>
  <groupId>net.twasi</groupId>
  <artifactId>obs-websocket-java</artifactId>
  <version>1.2.0</version>
</dependency>

To get started just instantiate the OBSRemoteController:

OBSRemoteController controller = new OBSRemoteController("ws://localhost:4444", false);

if (controller.isFailed()) { // Awaits response from OBS
  // Here you can handle a failed connection request
}
// Now you can start making requests

If you don't want your program to wait for a connection you could alternatively register an onConnect callback:

controller.registerConnectCallback(response -> {
	log.debug(response.getObsStudioVersion());

	// Other requests...
});

Websocket server with authentication

If your OBS websocket server is secured with a password, pass the password as a string to the controller:

OBSRemoteController controller = new OBSRemoteController("ws://localhost:4444", false, "myPassword");

Catch any authentication errors by registering a callback for this:

controller.registerConnectionFailedCallback(message -> {
    log.error("Failed to connect: " + message);
})

Supported requests and events

A list of supported requests and events can be found in the corresponding enum class files:

A description of every request and event can be found in the plugin's Protocol.MD file.


Examples

Examples can be found here. Just uncomment the requests you want to test or copy.


Logging

This project ships with SLF4J, and uses the SLF4J-Simple binding by default so logs are printed directly to the console.

If you wish to override this, for example with Logback, you must exclude SLF4J in your POM and add the dependency to the binding you want (depends on the vendor)

<dependencies>
    <dependency>
        <groupId>net.twasi</groupId>
        <artifactId>obs-websocket-java</artifactId>
        <version>1.0.6-tinatiel-1-0-0</version>
        <!-- Exclude the default logging implementation -->
        <exclusions>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    
    <!-- Add your desired logging implementation -->
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.1.7</version>
    </dependency>
</dependencies>

Contribution

If you miss an endpoint feel free to make a pull request. Any help is appreciated.

Building

If you've forked the repository and want to run the install goal to use your fork in your own project, please be aware the artifacts generated require being signed via GPG.

Once you've installed GPG and created a key-pair, you'll be prompted for your passphrase everytime you run the build. You can automate this by supplying gpg.passphrase property during the build, for example:

mvn verify -Dgpg.passphrase=YOURPASSPHRASE

In IntelliJ, you can supply the property via File > Settings > Build, Execution, Deployment > Maven > Runner > Properties. Once the gpg.passphrase property has been set there, you won't be prompted everytime you run the build.


Thanks to Palakis for the great plugin!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].