等待文件创建
我有一个调用网络服务的 silverlight 应用程序。该 Web 服务将 wav 文件编码为 mp3 格式。等待完整 mp3 文件创建的最佳方式应该如何?
问候
i have a silverlight app which calls a webservice. that webservice encodes a wav file to mp3 format. how should be the best way to wait for full mp3 file creation?
regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
某种进度条和消息对您的用户很有用。进度条不一定需要显示实际进度,它可能只是旋转以指示工作正在完成。
但是,如果您想要实际进度,您可以让 Web 服务在后台线程上生成 MP3,然后立即返回服务以指示生成已开始。然后,Silverlight 客户端可以重复请求进度,直到服务指示生成已完成并提供文件。这样您实际上可以提供一个逐渐接近 100% 的进度条。
Some kind of progress bar and message would be useful for your user. The progress bar doesn't necessarily need to show actual progress, it could just revolve indicating that work is being done.
However, if you wanted actual progress, you could have the web service generate the MP3 on a background thread, then return the service immediately to indicate generation had started. Then the Silverlight client could make a request for progress repeatedly until the service indicated the generation was done and provided the file. That way you could actually provide a progress bar that edged towards 100%.