miroslavpejic85 / mirotalksfu

🏆 WebRTC - SFU - Simple, Secure, Scalable Real-Time Video Conferences Up to 8k, compatible with all browsers and platforms.
https://sfu.mirotalk.com
GNU Affero General Public License v3.0
2.15k stars 340 forks source link

No video sources detected #118

Closed ecker00 closed 1 year ago

ecker00 commented 1 year ago

Describe the bug

No video sources are detected, "Video is off" and the video source list is blank. The camera icon is red, and nothing happens when I click on it.

To Reproduce

My system have quite a few unusual video sources available, such as capture cards. I'm wondering if that is causing an issue somewhere. I'm trying to debug it and look through the source code, but I'm not familiar enough to locate the issue.

Expected behavior

Have all my video sources available like all other conferencing application. My expected video sources would be:

Screenshots

Screenshot

Desktop - Mobile

Please complete the following information:

Additional context

Here is the console log:

Direct join Object
Room.js:428 Direct join Object
Room.js:387 Direct join Object
Room.js:402 Direct join Object
Room.js:417 Direct join Reconnect Object
SpeechRec.js:84 Speech recognition SpeechRecognition
SpeechRec.js:118 Browser supports webkitSpeechRecognition
Room.js:247 01 ----> init Enumerate Devices
Room.js:315 02 ----> Get Audio Devices
Room.js:504 04 ----> Who are you
Room.js:1199 04 ----> Get Local Storage Devices before null
Room.js:755 05 ----> join Room sommerles
RoomClient.js:223 06 ----> Load MediaSoup Client v 3.6.97
RoomClient.js:224 06.1 ----> PEER_ID 6uzU3FY6kEuB6VUBAAAd
RoomClient.js:308 07 ----> Join Room allowed
RoomClient.js:319 07.0 ----> Room Survey {enabled: false, url: ''}
RoomClient.js:325 07.1 ----> My Peer info {join_data_time: '2023-08-07-08:04:30', peer_uuid: 'd879944d-849e-462b-aaa2-0074096aeecf', peer_id: '6uzU3FY6kEuB6VUBAAAd', peer_name: 'Christer', peer_presenter: true, …}
Rules.js:75 06.1 ----> IsPresenter: true
RoomClient.js:339 07.2 Participants Count ----> 1
RoomClient.js:312 07.3 ----> Get Router Rtp Capabilities codecs:  (9) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
RoomClient.js:757 08 ----> Start local media
RoomClient.js:759 09 ----> Start audio media
RoomClient.js:822 Media constraints audioType: {audio: {…}, video: false}audio: {echoCancellation: true, noiseSuppression: true, deviceId: 'default'}video: false[[Prototype]]: Object
RoomClient.js:770 10 ----> Video is off
RoomClient.js:1985 [setVideoOff] Video-element-count 1
RoomClient.js:834 Supported Constraints {aspectRatio: true, autoGainControl: true, brightness: true, channelCount: true, colorTemperature: true, …}aspectRatio: trueautoGainControl: truebrightness: truechannelCount: truecolorTemperature: truecontrast: truedeviceId: truedisplaySurface: trueechoCancellation: trueexposureCompensation: trueexposureMode: trueexposureTime: truefacingMode: truefocusDistance: truefocusMode: trueframeRate: truegroupId: trueheight: trueiso: truelatency: truenoiseSuppression: truepan: truepointsOfInterest: trueresizeMode: truesampleRate: truesampleSize: truesaturation: truesharpness: truesuppressLocalAudioPlayback: truetilt: truetorch: truewhiteBalanceMode: truewidth: truezoom: true[[Prototype]]: Object
RoomClient.js:838 audioType settings -> {autoGainControl: true, channelCount: 1, deviceId: 'default', echoCancellation: true, groupId: '8aef72c6ec216d371968d2e5122a44230da90acc318745bd93a5f656fd096c09', …}
RoomClient.js:848 AUDIO ENABLE OPUS
RoomClient.js:883 PRODUCER PARAMS {track: MediaStreamTrack, appData: {…}, codecOptions: {…}}
RoomClient.js:401 Going to produce {kind: 'audio', appData: {…}, rtpParameters: {…}}
RoomClient.js:427 Producer Transport connecting...
RoomClient.js:887 PRODUCER Producer {_events: {…}, _eventsCount: 7, _maxListeners: Infinity, _closed: false, _observer: EnhancedEventEmitter, …}
RoomClient.js:2083 Producer Success attached media audioType
RoomClient.js:1429 [addProducer] audio-element-count 1
Room.js:1507 Room Client start audio
RoomClient.js:2090 Success, audio output device attached: default
RoomClient.js:431 Producer Transport connected
RoomClient.js:822 Media constraints videoType: {audio: false, video: {…}}
RoomClient.js:974  Produce error: DOMException: Could not start video source

That last line there only comes when I click on the video icon, but the issue seems to be somewhere around 10 ----> Video is off.

As my system have three capture card sources, OBS and Nvidia, it's quite unusual list of video sources, but if I have something to go on to debug this I can maybe figure it out why it's disabling the entire video feature. So far I've been looking at bit at https://github.com/miroslavpejic85/mirotalksfu/blob/main/public/js/RoomClient.js but not seeing why it's turning things off.

ecker00 commented 1 year ago

Looking at Room.js and I run these lines in my browser console (on any website):

navigator.mediaDevices
  .getUserMedia({ video: true })
  .then((stream) => console.log('Yay')).catch((e) => console.log('Noo', e))
// Output: Noo, DOMException: Could not start video source

Which is odd, it works for Google Meet, but not when I try http://webcamtests.com/

I guess the issue is on my end, and not with MiroTalk SFU. Just seems odd that Google Meet works fine.

miroslavpejic85 commented 1 year ago

Hey @ecker00,

Ensure that you have granted camera and microphone permissions and that no other applications, such as Skype or any other app, are currently using your webcam or microphone in the background.

I reproduced it by not allow the webcam when it required (maybe without realizing it you clicked on that button)

mirotalk-sfu-denied-cam

I guess the issue is on my end, and not with MiroTalk SFU.

Yes :) Check the picture.

mirotalk-sfu-cam-denied

Join us on the MiroTalk official forum, where you can find many answers regarding and also interact with our community ;)

Thank you and have a good day! Miroslav