大佬教程收集整理的这篇文章主要介绍了android – wcf渐进式下载,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这是我到目前为止所拥有的.这似乎工作,但它不是渐进式下载.它在Android应用程序中播放,但仅在整个文件下载后播放.
服务合约:
[OperationContract,WebGet(UriTemplate = "/GetFileStream/?filepath={virtualPath}")] Stream GetFileStream(String virtualPath);
服务配置:
<bindings> <webhttpBinding> <binding name="streamedhttpBinding" transferMode="StreamedResponse" maxReceivedmessageSize="1000000000"> </binding> </webhttpBinding> </bindings> <service name="..."> <endpoint address="" behaviorConfiguration="restful" binding="webhttpBinding" bindingConfiguration="streamedhttpBinding" contract="..." /> </service> <behaviors> <endpointBehaviors> <behavior name="restful"> <webhttp /> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name=""> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors>
如果您可以提供有关渐进式下载的源的链接,那么这也会有所帮助.对于渐进式下载wcf,我的谷歌搜索没有太多.感谢您的帮助.
Android代码:
player.reset(); player.setAudioStreamType(Au@L_693_12@manager.STREAM_MUSIC); player.setDatasource(path); player.prepare(); player.start();
玩家是一个MediaPlayer对象.我正在将数据源设置为路径中的URl.
<bindings> </bindings> <service name="..."> <endpoint address="" behaviorConfiguration="restful" binding="webhttpBinding" contract="..." /> </service> <behaviors> <endpointBehaviors> <behavior name="restful"> <webhttp /> </behavior> </endpointBehaviors> </behaviors>
请注意,端点上没有bindingConfiguration.
以上是大佬教程为你收集整理的android – wcf渐进式下载全部内容,希望文章能够帮你解决android – wcf渐进式下载所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。