Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
4346888
core: OperationCode
ChristopheCVB Sep 8, 2021
66a60d7
core: OperationCode
ChristopheCVB Sep 8, 2021
08067a7
core: Message data
ChristopheCVB Sep 8, 2021
50eb3fe
core: Message data
ChristopheCVB Sep 8, 2021
c8336c9
core: Message data
ChristopheCVB Sep 9, 2021
f812875
core: Comment GetVersion Request when client is identified
ChristopheCVB Sep 9, 2021
8d69bd6
core: requestStatus Codes
Pjiesco Nov 17, 2021
7314539
core: Upgrade dependencies
ChristopheCVB Nov 20, 2021
e40096a
core: Rename Event.Category to Event.Intent
ChristopheCVB Nov 20, 2021
eb22a49
core: Event Serialization + CurrentProfileChangedEvent
ChristopheCVB Nov 20, 2021
3923273
core: CurrentSceneCollectionChangedEvent
Pjiesco Nov 20, 2021
371fa70
core: ProfileListChangedEvent
Pjiesco Nov 20, 2021
62c2c6c
core: SceneCollectionListChangedEvent
Pjiesco Nov 20, 2021
6c3ffe0
fix: make fields final
Pjiesco Nov 20, 2021
325dfd7
core: CustomEvent
Pjiesco Nov 20, 2021
d357b60
core: ExitStartedEvent
Pjiesco Nov 20, 2021
490001e
core: StudioModeStateChangedEvent
Pjiesco Nov 20, 2021
16d867a
fix: Example
Pjiesco Nov 20, 2021
bfb9871
fix: CustomEventTriggered and SceneCollectionListChangedEventTriggere…
Pjiesco Nov 20, 2021
eb9c050
core: call super on toString + Filter events
Pjiesco Nov 20, 2021
8f1c6ce
fix: ObsCommunicatorEventIT
ChristopheCVB Nov 20, 2021
d8b9da6
fix: FilterEvent and add test
ChristopheCVB Nov 20, 2021
e4bf15d
core: InputAudioSyncOffsetChangedEvent
Pjiesco Nov 20, 2021
8bcf707
core: Input events + Tests
Pjiesco Nov 20, 2021
bd33fab
core: InputVolumeChangedEvent
Pjiesco Nov 20, 2021
de36f8b
core: Media events + Tests
Pjiesco Nov 20, 2021
7ef8c29
core: Output events + Tests
Pjiesco Nov 20, 2021
db637ab
core: SceneItem events + Tests
Pjiesco Nov 20, 2021
a8803e3
core: Scene events + Tests
Pjiesco Nov 21, 2021
edc6831
core: Update Logo fixes #124
ChristopheCVB Nov 24, 2021
96a95b4
core: Upgrade lombok
ChristopheCVB Nov 24, 2021
1aa3cd0
core: Make *Event.messageData non final
ChristopheCVB Nov 24, 2021
846d943
core: TransitionEvent and subclasses
ChristopheCVB Nov 24, 2021
65bd423
core: TransitionEvent and subclasses
ChristopheCVB Nov 24, 2021
c5b3494
core: TransitionEvent and subclasses
ChristopheCVB Nov 24, 2021
a4c9c07
core: Events Serialization Tests
ChristopheCVB Nov 24, 2021
3b14270
core: Events Serialization Tests
ChristopheCVB Nov 24, 2021
3a4e605
core: Events Serialization Tests
ChristopheCVB Nov 24, 2021
5fa7783
test: Reorganize test classes
ChristopheCVB Nov 24, 2021
beebe6e
Update GetStreamServiceSettingsResponse.java
ChristopheCVB Jan 7, 2022
282b7b7
5.x.x/protocol update requests config (#128)
ChristopheCVB Jan 20, 2022
799482b
Fix change in messages (#134) + more (#135)
nvdweem Oct 12, 2022
d95c25d
core: clean
ChristopheCVB Oct 12, 2022
4b038f3
FIX: VendorEvent
ChristopheCVB Oct 12, 2022
918ef80
cicd: Upgrade GitHub Actions
ChristopheCVB Oct 12, 2022
bf5d96d
cicd: Upgrade GitHub Actions
ChristopheCVB Oct 12, 2022
39991ee
cicd: Upgrade GitHub Actions
ChristopheCVB Oct 12, 2022
103fda0
core: Upgrade Dependencies & clean
ChristopheCVB Oct 12, 2022
2542544
fix: Events Intent
ChristopheCVB Oct 13, 2022
f1bfa7a
fix: Events Intent
ChristopheCVB Oct 13, 2022
7ba64ec
core: RequestBatch and RequestBatchResponse
ChristopheCVB Oct 13, 2022
60d3755
fix: Event.Intent names
ChristopheCVB Oct 13, 2022
b9da8be
fix: RequestBatch, RequestBatchResponse is still todo
Oct 13, 2022
48fe616
core: Event.Intent and Requests + RequestResponses
ChristopheCVB Oct 13, 2022
b25b33b
fix: RequestBatchResponse
Oct 13, 2022
ab3d76b
fix: Remove not-needed superbuilders
Oct 13, 2022
eb45695
fix: Get/SetSceneSceneTransitionOverride
Oct 13, 2022
15170c8
fix: Fix compilation errors
Oct 13, 2022
ce1567a
fix: Update test
Oct 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file modified .github/images/obs-ws-java.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Git tag
run: |
git tag $(cat VERSION)
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
java-package: jdk
- name: Grant execute permission for gradlew
run: chmod +x gradlew
distribution: temurin
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run unit tests
run: ./gradlew client:test
- name: Run integration tests
run: ./gradlew client:integrationTest
- name: Upload Failing Unit Test Results
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Unit and Int Test Failure Results
path: client/build/reports/tests/**
Expand All @@ -38,21 +38,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
java-package: jdk
- name: Grant execute permission for gradlew
run: chmod +x gradlew
distribution: temurin
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Pull and Run OBS Websocket
run: docker run -p 4444:4444 -d tinatiel/obswebsocket:latest
run: docker run -p 4455:4444 -d tinatiel/obswebsocket:latest
- name: Run End2End Secured tests
run: ./gradlew client:endToEndSecuredTest
- name: Upload Failing Unit Test Results
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: E2E Secured Test Failure Results
path: client/build/reports/tests/**
Expand All @@ -62,13 +62,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
java-package: jdk
- name: Grant execute permission for gradlew
run: chmod +x gradlew
distribution: temurin
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Example gradle build
run: ./gradlew example:build
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
distribution: temurin
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Gradle Maven Publish
run: |
./gradlew client:publishMavenJavaPublicationToMavenRepository
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
distribution: temurin
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Gradle Maven Publish
run: |
./gradlew client:publishMavenJavaPublicationToMavenRepository
Expand Down
122 changes: 73 additions & 49 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
# Contributing

## 📘 Notice to Developers: Repository Transfer 📘
On June 21st, 2021, this repository was transferred from the `Twasi` Organization to the
`obs-websocket-community-projects` Organization. This was done to better align this library with the

On June 21st, 2021, this repository was transferred from the `Twasi` Organization to the
`obs-websocket-community-projects` Organization. This was done to better align this library with the
greater Palakis' OBS Websocket plugin community, and provide better administrative tools.

Remotes will continue to operate as normal, due to GitHub automatic redirects. However, to avoid
confusion GitHub strongly recommends you update those remotes.
Remotes will continue to operate as normal, due to GitHub automatic redirects. However, to avoid
confusion GitHub strongly recommends you update those remotes.

If you haven't updated your remote, you can check like so; the below example shows an old remote:

```
C:\Users\...\websocket-obs-java>git remote -v
origin https://github.com/Twasi/websocket-obs-java.git (fetch)
origin https://github.com/Twasi/websocket-obs-java.git (push)
```

You can update and verify your remote is correct like this:

```
C:\Users\...\websocket-obs-java>git remote set-url origin https://github.com/obs-websocket-community-projects/obs-websocket-java.git
(no output)
C:\Users\...\websocket-obs-java>git remote -v
origin https://github.com/obs-websocket-community-projects/obs-websocket-java.git (fetch)
origin https://github.com/obs-websocket-community-projects/obs-websocket-java.git (push)
```

See [Transferring a repository](https://docs.github.com/en/github/administering-a-repository/managing-repository-settings/transferring-a-repository)
for more information.

## Testing

### Unit and Integration Tests

These tests can be run completely standalone and do not require an instance of OBS (though, they
may try to simulate bad network connections). These should always run automatically in CI/CD flows.

Expand All @@ -37,45 +43,54 @@ gradlew client:integrationTest
```

### End-To-End Automated Tests
These tests only exercise the authentication process with OBS Websockets (and not OS/env specific OBS features, such as Browser or VLC media sources). They are divided into the 'secure' and 'unsecure' portions.

The 'secure' portions require OBS Websockets to have authentication enabled with the password set to `password`, and are automated via CI/CD with the help of the [obs-websocket-docker](https://github.com/TinaTiel/obs-websocket-docker) docker library.
These tests only exercise the authentication process with OBS Websockets (and not OS/env specific
OBS features, such as Browser or VLC media sources). They are divided into the 'secure' and '
unsecure' portions.

The 'secure' portions require OBS Websockets to have authentication enabled with the password set
to `password`, and are automated via CI/CD with the help of
the [obs-websocket-docker](https://github.com/TinaTiel/obs-websocket-docker) docker library.

```
gradlew client:endToEndUnsecuredTest
```

The 'unsecure' portions require OBS Websockets authentication be disabled, and at this time must be run manually.
The 'unsecure' portions require OBS Websockets authentication be disabled, and at this time must be
run manually.

```
gradlew client:endToEndSecuredTest
```

### End-To-End Manual Tests

Unfortunately, there is incomplete feature parity between Windows and Linux distributions of OBS
Unfortunately, there is incomplete feature parity between Windows and Linux distributions of OBS
(Windows having the lion's share of features). This means that it isn't possible to exercise all
features offered by OBS (and OBS Websockets) unless run on a Windows environment and under specific
conditions.
conditions.

Therefore, the tests in the `endToEndManualTest` module require running manually in a local
Therefore, the tests in the `endToEndManualTest` module require running manually in a local
environment meeting these requirements:

- Windows 10 OS
- OBS 27+
- OBS Websockets 5+
- VLC Media Player
- Scene Collection from this project installed (See [OBS Resources](obs-resources/README.md)
for more information)
- Windows 10 OS
- OBS 27+
- OBS Websockets 5+
- VLC Media Player
- Scene Collection from this project installed (See [OBS Resources](obs-resources/README.md)
for more information)

These tests are run manually, and require you to follow the prompts during the test and watch for the results in OBS; you cannot run these test using a Docker image.
These tests are run manually, and require you to follow the prompts during the test and watch for
the results in OBS; you cannot run these test using a Docker image.

```
gradlew client:endToEndManualTest
```

### Example Project
We provide an example project to help people understand how to use this library. At this time, we verify only during CI/CD that it compiles.

We provide an example project to help people understand how to use this library. At this time, we
verify only during CI/CD that it compiles.

```
gradlew example:build
Expand All @@ -84,63 +99,72 @@ gradlew example:build
## Pull Request / Code Guidelines

### Branching
All Pull requests must be directed against the `develop` branch. Unless you are a contributor, you
will need to fork this repository and make a pull request for your fork. If you review a PR, we
recommend you use the GitHub CLI to pull the PR so that you can pull the code (e.g. if the fork branch

All Pull requests must be directed against the `develop` branch. Unless you are a contributor, you
will need to fork this repository and make a pull request for your fork. If you review a PR, we
recommend you use the GitHub CLI to pull the PR so that you can pull the code (e.g. if the fork
branch
is in a private repository).

You can follow whichever convention you would like for the names of your branches, but we recommend
that if working against a specific issue you reference the issue number (e.g. `topic-NN`) to make
the purpose of your branch more clear.

### Code Conventions & Best Practices
- Only push code that compiles.
- Try to follow Google style conventions.
- Include small unit tests when possible.
- Manual tests need to pass before filing PRs.
- Update the manual observation integration test where applicable; allow other developers to
easily verify your code works as expected without requiring them to write their own.
- If you are adding a new feature (for example, setting the current scene), then include any
tangential features (in this example, getting the current scene, and registering for
"scene changed" events) to provide feature-completeness for users of this library.
- Use Lombok to generate getters, setters, builders, toString, etc. to keep DTO
boilerplate more manageable. Exceptions to this should be considered carefully where customization
makes sense (for example, in the ObsCommunicator and ObsRemoteController builders).
- Avoid switch-case statements to handle serialization/deserialization. Instead, register Gson
TypeAdapters and include unit tests to verify serialization/deserialization works as expected.


- Only push code that compiles.
- Try to follow [Google style conventions](https://github.com/google/google-java-format).
- Include small unit tests when possible.
- Manual tests need to pass before filing PRs.
- Update the manual observation integration test where applicable; allow other developers to
easily verify your code works as expected without requiring them to write their own.
- If you are adding a new feature (for example, setting the current scene), then include any
tangential features (in this example, getting the current scene, and registering for
"scene changed" events) to provide feature-completeness for users of this library.
- Use Lombok to generate getters, setters, builders, toString, etc. to keep DTO
boilerplate more manageable. Exceptions to this should be considered carefully where customization
makes sense (for example, in the ObsCommunicator and ObsRemoteController builders).
- Avoid switch-case statements to handle serialization/deserialization. Instead, register Gson
TypeAdapters and include unit tests to verify serialization/deserialization works as expected.

## CI/CD

All CI/CD is governed by push-to-branch naming semantics, and the [VERSION](VERSION) file. All are
All CI/CD is governed by push-to-branch naming semantics, and the [VERSION](VERSION) file. All are
executed by GitHub Actions (see [.github/workflows](.github/workflows)).
- [build.gradle](build.gradle) manages pushing releases or snapshots with other metadata to maven central.
- Version is configured by the [VERSION](VERSION) file.
- Release/Snapshot is governed by the `IS_RELEASE` env var set to 'YES' or not.
- Pushes to `develop` trigger snapshot releases to maven central. Creds are in GH secrets.
- Pushes to `release/*` trigger releases to maven central. Creds are in GH secrets.
- Pushes to `master` creates a git tag using the VERSION file.

- [build.gradle](build.gradle) manages pushing releases or snapshots with other metadata to maven
central.
- Version is configured by the [VERSION](VERSION) file.
- Release/Snapshot is governed by the `IS_RELEASE` env var set to 'YES' or not.
- Pushes to `develop` trigger snapshot releases to maven central. Creds are in GH secrets.
- Pushes to `release/*` trigger releases to maven central. Creds are in GH secrets.
- Pushes to `master` creates a git tag using the VERSION file.

### Publishing Snapshots

Snapshots are available to developers wanting to use the latest version of this library.
While not perfect, any pushes to develop should (1) Compile, (2) pass unit tests, and (3) have been
checked manually as described above.
checked manually as described above.

Provided these are satisfied, this is how you can publish a snapshot:

1. Create a branch from `develop` and work on it.
1. Create a PR for merge into the `develop` branch.
1. Merge into `develop`; this triggers a SNAPSHOT release

### Publishing Releases
Releases are available to the general-public as official releases on Maven Central. In addition

Releases are available to the general-public as official releases on Maven Central. In addition
to meeting code standards, they also include release notes and a tag in git.

To make an official release, follow this process:
1. When you want to release what is on the `develop` branch, create a new branch with the

1. When you want to release what is on the `develop` branch, create a new branch with the
name `release/A.B.C`.
1. Push the new release branch; this will create a new release in Maven Central.
1. Create a PR to merge that branch into `master`. Include in that PR any release notes for that
release; see [Release 1.3.0](https://github.com/Twasi/websocket-obs-java/pull/44) for an
1. Create a PR to merge that branch into `master`. Include in that PR any release notes for that
release; see [Release 1.3.0](https://github.com/Twasi/websocket-obs-java/pull/44) for an
example, if you're not sure what to write.
1. Merge the PR into master; this will create a tag on master using the current VERSION
1. Checkout the `develop` branch and increment the patch version; this way, future pushes to
1. Checkout the `develop` branch and increment the patch version; this way, future pushes to
develop will be against the snapshot of that version.
Loading