等待文件创建

发布于 2024-09-02 11:07:24 字数 97 浏览 3 评论 0原文

我有一个调用网络服务的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

惜醉颜 2024-09-09 11:07:24

某种进度条和消息对您的用户很有用。进度条不一定需要显示实际进度,它可能只是旋转以指示工作正在完成。

但是,如果您想要实际进度,您可以让 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%.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文