Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support to Stream Videos from Dart as HttpServer #3461

Closed
DartBot opened this issue Jun 8, 2012 · 4 comments
Closed

Add Support to Stream Videos from Dart as HttpServer #3461

DartBot opened this issue Jun 8, 2012 · 4 comments
Assignees
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-as-intended Closed as the reported issue is expected behavior library-io type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jun 8, 2012

This issue was originally filed by @pjako


Currently if I use dart as http server the streaming of a video to HTMLVideoElement doesn't work right, you cant seek and you can loop videos.
https://developer.mozilla.org/en/DOM/HTMLVideoElement

To get that working, dart HttpServer should support streaming http responses.

Not shure if it helps but the problem seems similar...
http://stackoverflow.com/questions/4538810/html5-video-element-non-seekable-when-using-django-development-server

@dgrove
Copy link
Contributor

dgrove commented Jun 11, 2012

Set owner to @whesse.
Removed Type-Defect label.
Added Type-Enhancement, Area-IO, Triaged labels.

@whesse
Copy link
Contributor

whesse commented Jun 13, 2012

I believe that to get seeking working on a streamed video, you need to send the "Accept-Ranges" HTTP header in the response, and handle the "Range" header in the requests. I am not sure whether this is more compatible with the Transfer-Encoding: chunked header (streaming), or the Content-Length: header.

If you are doing all of this already, please attach an example of your server code that is not supporting seeking or streaming.

@sgjesse
Copy link
Contributor

sgjesse commented Jun 4, 2013

When dealing with streaming video the client typically want to use byte ranges. To indicate renges support to the client set the Accept-Ranges header on the response to serve the video:

  response.headers.set(HttpHeaders.ACCEPT_RANGES, "bytes");

Subsequest requests (e.g. seeking) from the client will then contain Range headers, which needs to be parsed. Look for

  request.headers.value("range");

The File class recently had optional start and end arguments added to openRead to help support streaming parts of a file.

We are preparing an article with details on this.


Added AsDesigned label.

@kevmoo
Copy link
Member

kevmoo commented May 14, 2014

Removed Area-IO label.
Added Area-Library, Library-IO labels.

@DartBot DartBot added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io closed-as-intended Closed as the reported issue is expected behavior labels May 14, 2014
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
copybara-service bot pushed a commit that referenced this issue Jul 17, 2023
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/d716fa3..06d7288):
  06d72882  2023-07-14  Sam Rawlins  Move analyze and test tasks (#3461)

ecosystem (https://github.com/dart-lang/ecosystem/compare/db9d71d..2052a4c):
  2052a4c  2023-07-14  Devon Carew  shorten some text in the markdown summary table (#136)

leak_tracker (https://github.com/dart-lang/leak_tracker/compare/5675231..515612e):
  515612e  2023-07-14  Polina Cherkasova  Request retaining path more carefully. (#95)
  04405c3  2023-07-13  Polina Cherkasova  Add constraint to version of leak_tracker. (#94)
  0fe8bca  2023-07-13  Polina Cherkasova  Upgrade leak_tracker_testing. (#93)
  3fe4ca0  2023-07-13  Polina Cherkasova  Enable turn on/off tracking for leak types for a test. (#92)

mockito (https://github.com/dart-lang/mockito/compare/ffbbb4c..afa20a8):
  afa20a8  2023-07-14  Ilya Yanok  Disable deprecated member findings in generated code

native (https://github.com/dart-lang/native/compare/acad396..7c474e1):
  7c474e1  2023-07-14  Daco Harkes  Add topics (#89)

Change-Id: Ib5abefae43e765939c0722dd47d329d45991b06c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/314160
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-as-intended Closed as the reported issue is expected behavior library-io type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants