mpromonet / webrtc-streamer

WebRTC streamer for V4L2 capture devices, RTSP sources and Screen Capture
https://webrtcstreamer.agreeabletree-365b9a90.canadacentral.azurecontainerapps.io/?layout=2x2
The Unlicense
3.03k stars 609 forks source link

Audio device initialization failed in docker #644

Open pengchanglu opened 1 year ago

pengchanglu commented 1 year ago

image

Describe the bug Docker startup will report an error in the Windows environment, resulting in RTSP being unusable

To Reproduce Steps to reproduce the behavior: docker run -p 8000:8000 -it mpromonet/webrtc-streamer See error

HTTP Listen at 0.0.0.0:8000 [000:000][1] (audio_device_pulse_linux.cc:1605): failed to connect context, error=-1 [000:000][1] (audio_device_pulse_linux.cc:145): failed to initialize PulseAudio [000:000][1] (audio_device_impl.cc:341): Audio device initialization failed.

open url http://localhost:8000/webrtcstreamer.html?video=rtsp://admin:TANMKK@192.168.1.5:554/Streaming/Channels/101 failed.

pengchanglu commented 1 year ago

cd /html cat webrtcConfig.js

echo var webrtcConfig = { >> webrtcConfig.js echo url: "", >> webrtcConfig.js echo options: "rtptransport=tcp&timeout=60", >> webrtcConfig.js echo layoutextraoptions: "&width=320&height=0", >> webrtcConfig.js echo defaultvideostream: "Bunny" >> webrtcConfig.js echo } >> webrtcConfig.js

open url http://localhost:8000/webrtcstreamer.html?video=rtsp://admin:TANMKK@192.168.1.5:554/Streaming/Channels/101 success !

pengchanglu commented 1 year ago

cd /html cat webrtcConfig.js

echo var webrtcConfig = { >> webrtcConfig.js echo url: "", >> webrtcConfig.js echo options: "rtptransport=tcp&timeout=60", >> webrtcConfig.js echo layoutextraoptions: "&width=320&height=0", >> webrtcConfig.js echo defaultvideostream: "Bunny" >> webrtcConfig.js echo } >> webrtcConfig.js

open url http://localhost:8000/webrtcstreamer.html?video=rtsp://admin:TANMKK@192.168.1.5:554/Streaming/Channels/101 success !

Missing webrtcconfig.js file