question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement streaming in the browser

See original GitHub issue

The current use of chunked transfer encoding is based on xhr.responseText. There are now more efficient methods available for Firefox (moz-chunked-text) and Chrome (ReadableByteStream). Would there be any interest in using those methods when possible?

It would be awesome if superagent supported streaming in the browser along the lines of what this library offers. I’d be willing to contribute if there’s any interest.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:21 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
kornelskicommented, Apr 29, 2018

fetch() is a thing now and it works well with streaming, so if you need streams, use fetch().

0reactions
kornelskicommented, Oct 4, 2016

If you get error in XmlHTTPRequest then there’s nothing we can do. The browser would report the same error via streaming API too, and stop streaming early.

It’s most likely that it’s a problem outside of browser, e.g. in your CDN, your reverse proxy, your web server, or middleware managing node.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Livestreaming web audio and video - Developer guides | MDN
Livestreaming technology is often employed to relay live events such as sports, concerts and more generally TV and Radio programmes that are ...
Read more >
Streams—The definitive guide - web.dev
Streams —The definitive guide. Learn how to use readable, writable, and transform streams with the Streams API. Feb 19, 2021 — Updated Jun...
Read more >
How video streaming works on the web: An introduction
Note: this article is an introduction to video streaming in JavaScript and is mostly targeted to web developers.
Read more >
How to Live Stream Directly From Your Browser ... - YouTube
How to Live Stream from your browser with Restream Studio? In this tutorial, I show you how to start a livestream using only...
Read more >
Chapter 10. Streaming data - Progressive Web Apps
We'll dive into what web streams are and how to use them and go through some ... This allows the browser to use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found