create account

Add Partial Content Support for Serving Media in Flask App by singhpratyush

View this thread on: hive.blogpeakd.comecency.com
· @singhpratyush · (edited)
Add Partial Content Support for Serving Media in Flask App
### New Features
- What feature(s) did you add?  
Added support for partial content while serving media files, enabling audio player to seek in web apps.

- How did you implement it/them?  
Used header info in request from the client to forward the same request to media server and serve it with partial content enabled.

See diff [here](https://github.com/anyaudio/anyaudio-server/compare/54923fa49b78627f0b206bb1fdc1c37023378daa...10e6211e39e430c83f9fdef72a1b82b2c446bcaf).

Related blog post - https://codeburst.io/the-taste-of-media-streaming-with-flask-cdce35908a50.

<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@singhpratyush/add-partial-content-support-for-serving-media-in-flask-app">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , ,
properties (23)
authorsinghpratyush
permlinkadd-partial-content-support-for-serving-media-in-flask-app
categoryutopian-io
json_metadata"{"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":64926339,"name":"anyaudio-server","full_name":"anyaudio/anyaudio-server","html_url":"https://github.com/anyaudio/anyaudio-server","fork":false,"owner":{"login":"anyaudio"}},"pullRequests":[],"platform":"github","type":"development","tags":["utopian-io","web","flask","web-app","streaming-api"],"links":["https://github.com/anyaudio/anyaudio-server/compare/54923fa49b78627f0b206bb1fdc1c37023378daa...10e6211e39e430c83f9fdef72a1b82b2c446bcaf"],"moderator":{"account":"amosbastian","time":"2018-04-30T22:04:10.018Z","pending":false,"reviewed":false,"flagged":true},"questions":null,"score":null,"total_influence":null,"staff_pick":null,"staff_pick_by":null,"config":{"questions":[{"question":"How would you describe the formatting, language and overall presentation of the post?","question_id":"dev-1","answers":[{"answer":"The post is of very high quality.","answer_id":"dev-1-a-1","value":10},{"answer":"The post is of decent quality, but not spectacular in any way.","answer_id":"dev-1-a-2","value":7},{"answer":"The post is poorly written and/or formatted, but readable.","answer_id":"dev-1-a-3","value":3},{"answer":"The post is really hard to read and the content is barely understandable.","answer_id":"dev-1-a-4","value":0}]},{"question":"How would you rate the impact and significance of the contribution to the project and/or open source ecosystem in terms of uniqueness, usefulness and potential future applications?","question_id":"dev-2","answers":[{"answer":"This contribution adds high value and holds great significance for the project and/or open source ecosystem.","answer_id":"dev-2-a-1","value":35},{"answer":"This contribution adds significant value to the project and/or open source ecosystem. ","answer_id":"dev-2-a-2","value":23},{"answer":"This contribution adds some value to the project and/or open source ecosystem.","answer_id":"dev-2-a-3","value":12.5},{"answer":"This contribution hold no value and is insignificant in impact. ","answer_id":"dev-2-a-4","value":0}]},{"question":"How would you rate the total volume of work invested into this contribution?","question_id":"dev-3","answers":[{"answer":"This contribution appears to have demanded a lot of intensive work.","answer_id":"dev-3-a-1","value":20},{"answer":"This contribution appears to have required an average volume of work.","answer_id":"dev-3-a-2","value":14},{"answer":"This contribution shows some work done.","answer_id":"dev-3-a-3","value":6},{"answer":"This contribution shows no work done.","answer_id":"dev-3-a-4","value":0}]},{"question":"How would you rate the quality of the code submitted?","question_id":"dev-4","answers":[{"answer":"High - it follows all best practices. ","answer_id":"dev-4-a-1","value":20},{"answer":"Average - it follows most best practices.","answer_id":"dev-4-a-2","value":14},{"answer":"Low - it follows some best practices.","answer_id":"dev-4-a-3","value":6},{"answer":"Very low - it doesn't follow any best practices. ","answer_id":"dev-4-a-4","value":0}]},{"question":"How would you rate the knowledge and expertise necessary to fix the bug / implement the added feature(s)?","question_id":"dev-5","answers":[{"answer":"High - a lot of research and specific knowledge was required.","answer_id":"dev-5-a-1","value":7.5},{"answer":"Average - some research and knowledge was required.","answer_id":"dev-5-a-2","value":5.25},{"answer":"Low - not much knowledge or skill were required.","answer_id":"dev-5-a-3","value":2.25},{"answer":"Insignificant - no knowledge or skills were necessary.","answer_id":"dev-5-a-4","value":0}]},{"question":"How would you rate the accuracy and readability of the commit messages?","question_id":"dev-6","answers":[{"answer":"High - they are concise, descriptive and consistent. ","answer_id":"dev-6-a-1","value":2.5},{"answer":"Average - they are mostly concise, descriptive and consistent. ","answer_id":"dev-6-a-2","value":2},{"answer":"Low - they could be more concise, descriptive or consistent.","answer_id":"dev-6-a-3","value":0.75},{"answer":"Very low - they aren't concise, descriptive or consistent at all.","answer_id":"dev-6-a-4","value":0}]},{"question":"How do you rate the quality of the comments in the code?","question_id":"dev-7","answers":[{"answer":"High - everything is well-commented and adds to the readability of the code. ","answer_id":"dev-7-a-1","value":5},{"answer":"Average - most of the code is commented and most if it adds to the readability of the code.","answer_id":"dev-7-a-2","value":3},{"answer":"Low - little of the code is commented, but it still adds to the readability.","answer_id":"dev-7-a-3","value":1.5},{"answer":"Very low - the added comments provide no value or are not present at all.","answer_id":"dev-7-a-4","value":0}]}]}}"
created2018-04-29 07:29:33
last_update2018-04-30 22:04:12
depth0
children2
last_payout2018-05-06 07:29:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length775
author_reputation7,035,648,262,478
root_title"Add Partial Content Support for Serving Media in Flask App"
beneficiaries
0.
accountutopian.pay
weight1,500
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id52,780,732
net_rshares2,145,321,791
author_curate_reward""
vote details (7)
@amosbastian · (edited)
Hi, your contribution was rejected for the following reason

* Commits must not be older than 14 days. The commits linked were made on Nov 25, 2017. I must also say that even if the commits were made in the last 14 days the amount of work (both the code and the contribution itself) would not be enough to get accepted.

I recommend reading the [rules](https://utopian.io/rules) before contributing again in the future.

----------------------------------------------------------------------
Need help? Write a ticket on https://support.utopian.io.
Chat with us on [Discord](https://discord.gg/uTyJkNm).

**[[utopian-moderator]](https://utopian.io/moderators)**
properties (22)
authoramosbastian
permlinkre-singhpratyush-add-partial-content-support-for-serving-media-in-flask-app-20180430t220625252z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-04-30 22:06:24
last_update2018-04-30 22:07:48
depth1
children0
last_payout2018-05-07 22:06:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length661
author_reputation174,473,586,900,705
root_title"Add Partial Content Support for Serving Media in Flask App"
beneficiaries
0.
accountutopian.pay
weight1,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id53,115,157
net_rshares0
@steemitboard ·
Congratulations @singhpratyush! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/votes.png)](http://steemitboard.com/@singhpratyush) Award for the number of upvotes

Click on any badge to view your own Board of Honor on SteemitBoard.

To support your work, I also upvoted your post!
For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard)

If you no longer want to receive notifications, reply to this comment with the word `STOP`

> Upvote this notification to help all Steemit users. Learn why [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
👍  
properties (23)
authorsteemitboard
permlinksteemitboard-notify-singhpratyush-20180429t110515000z
categoryutopian-io
json_metadata{"image":["https://steemitboard.com/img/notifications.png"]}
created2018-04-29 11:05:15
last_update2018-04-29 11:05:15
depth1
children0
last_payout2018-05-06 11:05:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length734
author_reputation38,975,615,169,260
root_title"Add Partial Content Support for Serving Media in Flask App"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id52,808,350
net_rshares306,595,477
author_curate_reward""
vote details (1)