作者:justnicetwo | 来源:互联网 | 2023-10-17 14:49
Imdevelopinganappwhichneedstogetmusicfilebystreamingforplayinglive.我正在开发一个应用程序,需要通过流
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 1 Mbps).
在请求歌曲api中,我可以指定带宽(例如:50kbps,100kbps,300,600或1Mbps)。
The more the bandwith is big, the more the file will get time to be fetched. As I don't want the users to be restricted about that I have multiple choices to deal with it:
bandwith越大,文件就越有时间获取。由于我不希望用户受到限制,因此我有多种选择来处理它:
Detect wether the phone is using 3g, wifi or Edge and specify an bandwith for each connection speed.
检测到手机正在使用3g,wifi或Edge,并为每个连接速度指定带宽。
Let the user decide the quality of the song he will get: like youtube (but the users won't be people that know much about computing: the more easy is the software, the more it will fit)
让用户决定他将获得的歌曲的质量:像youtube(但用户不会是那些了解计算的人:软件越容易,它就越适合)
Having a way to evaluate properly the connection speed: Like fetching a file, measure the time that it took and set the bandwith.
有办法正确评估连接速度:就像获取文件一样,测量它所花费的时间并设置带宽。
I know that connection speed could vary a lot if user loose the wifi, or is using 3g moving in the street. And the thing is that I can't change the bandwidth when the song will be playing.
我知道如果用户放松wifi,或者在街上使用3g移动,连接速度可能会有很大差异。而事实是,当歌曲播放时我无法改变带宽。
Maybe you have experience about that you would like to share?
也许你有关于你想分享的经验?
Thank you!
谢谢!
4 个解决方案