-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Comments
Set owner to @whesse. |
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. |
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. |
Removed Area-IO label. |
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 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
The text was updated successfully, but these errors were encountered: