devopvoid / webrtc-java

WebRTC for desktop platforms running Java
Apache License 2.0
248 stars 60 forks source link

There was no screen display on macOS 12 #45

Closed icuxika closed 1 year ago

icuxika commented 2 years ago

I downloaded the latest jar package and successfully entered a chat room, but there was no screen display. Does it need any additional configuration?

icuxika commented 2 years ago

system

macOS 12.0.1 21A559 x86_64

JAVA_HOME

Temurin-17+35

log

java -jar webrtc-javafx-demo-0.4.0-macos-x86_64.jar 
2021-11-24 20:56:14.111 java[98665:7270031] TSM AdjustCapsLockLEDForKeyTransitionHandling - _ISSetPhysicalKeyboardCapsLockLED Inhibit
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "dev.onvoid.webrtc.media.MediaStreamTrack.getKind()" because "track" is null
    at dev.onvoid.webrtc.demo.net.PeerConnectionClient.setMicrophoneActive(PeerConnectionClient.java:265)
    at dev.onvoid.webrtc.demo.service.PeerConnectionService.setMicrophoneActive(PeerConnectionService.java:294)
    at dev.onvoid.webrtc.demo.javafx.view.FxCallView.lambda$setOnMicrophoneActive$6(FxCallView.java:157)
    at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(BooleanPropertyBase.java:104)
    at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:111)
    at javafx.beans.property.BooleanPropertyBase.bind(BooleanPropertyBase.java:177)
    at dev.onvoid.webrtc.demo.javafx.control.skin.CallControlsSkin.initLayout(CallControlsSkin.java:155)
    at dev.onvoid.webrtc.demo.javafx.control.skin.CallControlsSkin.<init>(CallControlsSkin.java:43)
    at dev.onvoid.webrtc.demo.javafx.control.CallControls.createDefaultSkin(CallControls.java:123)
    at javafx.scene.control.Control.doProcessCSS(Control.java:897)
    at javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
    at com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
    at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
    at javafx.scene.Parent.doProcessCSS(Parent.java:1399)
    at javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
    at com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
    at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
    at javafx.scene.Parent.doProcessCSS(Parent.java:1399)
    at javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
    at com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
    at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
    at javafx.scene.Node.processCSS(Node.java:9540)
    at javafx.scene.Node.processCSS(Node.java:9533)
    at javafx.scene.Scene.doCSSPass(Scene.java:569)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2477)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:563)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "dev.onvoid.webrtc.media.MediaStreamTrack.getKind()" because "track" is null
    at dev.onvoid.webrtc.demo.net.PeerConnectionClient.setCameraActive(PeerConnectionClient.java:282)
    at dev.onvoid.webrtc.demo.service.PeerConnectionService.setCameraActive(PeerConnectionService.java:302)
    at dev.onvoid.webrtc.demo.javafx.view.FxCallView.lambda$setOnCameraActive$7(FxCallView.java:164)
    at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(BooleanPropertyBase.java:104)
    at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:111)
    at javafx.beans.property.BooleanPropertyBase.bind(BooleanPropertyBase.java:177)
    at dev.onvoid.webrtc.demo.javafx.control.skin.CallControlsSkin.initLayout(CallControlsSkin.java:156)
    at dev.onvoid.webrtc.demo.javafx.control.skin.CallControlsSkin.<init>(CallControlsSkin.java:43)
    at dev.onvoid.webrtc.demo.javafx.control.CallControls.createDefaultSkin(CallControls.java:123)
    at javafx.scene.control.Control.doProcessCSS(Control.java:897)
    at javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
    at com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
    at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
    at javafx.scene.Parent.doProcessCSS(Parent.java:1399)
    at javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
    at com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
    at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
    at javafx.scene.Parent.doProcessCSS(Parent.java:1399)
    at javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
    at com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
    at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
    at javafx.scene.Node.processCSS(Node.java:9540)
    at javafx.scene.Node.processCSS(Node.java:9533)
    at javafx.scene.Scene.doCSSPass(Scene.java:569)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2477)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:563)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
devopvoid commented 2 years ago

Currently there are 2 issues:

  1. This library is missing the macOS webcam support since it is not implemented by the WebRTC library itself. But there is demo code which has webcam functionality implemented. I will tackle this issue soon.
  2. It seems the AppRTC protocol has changed this is why the demo is not working properly. The demo is just a proof of work of webrtc-java. I'm not sure whether to fix the demo code or not wasting time for that and rather extend and stabilize the library itself, like implementing macOS webcam support.
devopvoid commented 1 year ago

Same macOS camera issue as in #34