Best way to evaluate connection speed

后端 未结 4 1772
北荒
北荒 2021-01-31 16:10

I\'m developing an app which needs to get music file by streaming for playing live.

In the request song api I can specify the bandwith (eg: 50kbps, 100kbps, 300, 600 or

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-31 16:35

    why not try to change your view of things. Try to flow with your users. say your user wishes to download 128 kbit quality song. you start the download , WHILE downloading you make an average download time, take a few seconds for this average to stabilize, and if it's below certain value make a pop up to tell the user that his connection is too slow for the current bandwidth and ask him if to lessen the quality or to keep downloading slowly.

    This will:

    1. let the users the option to always assume they can get the best quality media.
    2. let u do your check in runtime and change the quality accordingly while downloading without the need to pre check.
    3. keeps your app simple to users.

    I know i'm not answering your specific requirement, i'm just offering a different view.

提交回复
热议问题