WebTransport server does not support live-streaming

Open
#756 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 13 days

Nobody has claimed this yet.

Assessment

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

Research direction

Start with webtransport_server.py and the calls to _http._quic.send_stream_data shown in the reproduction. Read the related aioquic issue 226 to understand the streaming behavior and verify the server's event handling. Done means generated or media data is delivered continuously to the WebTransport client.

Written by the indexing model from the issue text.

Description

WebTransport server does not support live-streaming (media streams; data streams).

Steps to reproduce: Modify webtransport_server.py to stream content using, for example

for c in iter(lambda: ''.join(choice(digits) for i in range(512)).encode('ascii'), b''):  # replace '' with b'' for Python 3
                    if c is not None:
                        self._http._quic.send_stream_data(
                            event.stream_id, c, end_stream=False)  

and

                cmd = 'parec', '-d', 'alsa_output.pci-0000_00_1.analog-stereo.monitor'
                process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
                os.set_blocking(process.stdout.fileno(), False)
                for c in iter(lambda: process.stdout.read(512), b''):  
                    if c is not None:                     
                        self._http._quic.send_stream_data(
                            event.stream_id, c, end_stream=False)

Expected result: Data to be streamed to WebTransport client.
Actual result: No data is streamed to client.
Related: https://github.com/aiortc/aioquic/issues/226.

Dominant language
JavaScript
Stars
5.9k
Forks
2.4k
Avg merge
12d 12h
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from GoogleChrome/samples

All issues in GoogleChrome/samples

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.