Explain how range requests work with SDK #279

Open
opened 2019-05-20 14:44:43 +02:00 by tzarebczan · 0 comments
tzarebczan commented 2019-05-20 14:44:43 +02:00 (Migrated from github.com)

This should be a new guide on how to use range requests with the SDK.
Summary:
Seekable downloads and range request support
This release adds seekable streaming downloads and playback via HTTP range requests at http://<streaming_server>/stream/<sd_hash>, as well as new configuration settings streaming_server (default: localhost:5280) and streaming_get (default: True). For convenience, File type api response objects have a new streaming_url string at which the partial content stream can be requested. Only files already in the file manager can be streamed via range requests, if given an sd hash of an unknown stream the server will respond with a 404 error.
Provided thestreaming_get setting is not disabled, new streams can be requested from a claim name and optional claim id at http://<streaming_server>/get/ or http://<streaming_server>/get//<claim_id>. These will internally call the api method get and return an http redirect to the /stream endpoint.
Writing downloads to the file system can now be disabled or enabled by default using the new save_files setting. The existing get command will follow this setting but can be overridden with the new save_file argument.
The added file_save command will explicitly save a file to disk.

This should be a new guide on how to use range requests with the SDK. Summary: Seekable downloads and range request support This release adds seekable streaming downloads and playback via HTTP range requests at http://<streaming_server>/stream/<sd_hash>, as well as new configuration settings streaming_server (default: localhost:5280) and streaming_get (default: True). For convenience, File type api response objects have a new streaming_url string at which the partial content stream can be requested. Only files already in the file manager can be streamed via range requests, if given an sd hash of an unknown stream the server will respond with a 404 error. Provided thestreaming_get setting is not disabled, new streams can be requested from a claim name and optional claim id at http://<streaming_server>/get/<name> or http://<streaming_server>/get/<name>/<claim_id>. These will internally call the api method get and return an http redirect to the /stream endpoint. Writing downloads to the file system can now be disabled or enabled by default using the new save_files setting. The existing get command will follow this setting but can be overridden with the new save_file argument. The added file_save command will explicitly save a file to disk.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry.tech#279
No description provided.