nextcloud / nextcloud/spreed

[SIP] Video not displayed if initially blank and only received after some time

Open
#13,565 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug feature: SFU & SIP ☎️
Dominant language
PHP
Stars
2.2k
Forks
587
Avg merge
18h 27m
Merged PRs (30d)
333

Description

Noticed this while working with https://github.com/nextcloud/spreed/pull/13486 on the SIP bridge.

Currently the video unmute event is triggered if more than 2000 bytes are received within a second of the stream starting:
https://github.com/nextcloud/spreed/blob/d63691af4228767d37249d4649f04049305e230f/src/utils/webrtc/webrtc.js#L1231-L1241

If less than 2000 bytes (but more than 0) are received, the video is assumed as "disabled" and further checks are disabled:
https://github.com/nextcloud/spreed/blob/d63691af4228767d37249d4649f04049305e230f/src/utils/webrtc/webrtc.js#L1313

While this doesn't happen all the time, when it happens, only a datachannel unmute event will make the video appear in the callview:
https://github.com/nextcloud/spreed/blob/d63691af4228767d37249d4649f04049305e230f/src/utils/webrtc/webrtc.js#L1575

This is a problem for SIP video which might be empty / black at the beginning and only start after some time, and datachannels are not supported by the SIP bridge.

Adding here for tracking. Maybe @danxuliu has an idea if there is a simple way to support this case without having to implement datachannels in the SIP bridge.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/utils/webrtc/webrtc.js at the linked sections around lines 1231, 1313, and 1575. Trace how initial byte counts disable further checks and how the datachannel unmute event makes video appear. Done means delayed, initially blank SIP video can appear without relying on datachannels.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.