Skip to content

Conversation

@Kas-tle
Copy link

@Kas-tle Kas-tle commented Dec 1, 2025

I am trying to use this library in a docker scenario for which I do not require audio or video features. This makes the hard requirement for pulse audio a bit of a pain. See #153 for example.

Disabling audio as described in the docs does not help (https://jrtc.dev/guide/audio/audio-devices#disabling-audio) still leads to a java.lang.UnsatisfiedLinkError. This is because the static block in AudioDeviceModuleBase that loads all natives
https://github.com/devopvoid/webrtc-java/blob/main/webrtc/src/main/java/dev/onvoid/webrtc/media/audio/AudioDeviceModuleBase.java#L44-L51 immediately requires pulse due to the hard link in https://github.com/devopvoid/webrtc-java/blob/main/webrtc-jni/src/main/cpp/CMakeLists.txt#L113.

This PR removes the hard link to pulse and dynamically loads all its functions. This allows use of, e.g. kDummyAudio. I fully understand this could be seen as a hacky solution, so I would be happy to work on any suggestions you might have for an alternate approach.

I also updated the actions to:

  • Archive the artifacts for the various builds so it is easier to test changes without having to setup a whole dev environment
  • Only run the publishing step when the repo is devopvoid/webrtc-java so that the action does not fail on forks

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant