【发布时间】:2014-07-01 12:06:24
【问题描述】:
WP 8.1 有 BackgroundMediaPlayer 播放背景音频。
http://www.jayway.com/2014/04/24/windows-phone-8-1-for-developers-the-background-media-player/
在本教程中作者设置 ms-appx 源来播放歌曲:
BackgroundMediaPlayer.Current.SetUriSource(new Uri("ms-appx:///Assets/Media/Ring01.wma"));
成功。 但是,如何使用音乐库中的音频设置 UriSource?仅使用 SetUriSource 因为:
新的后台播放器提供了三种简单的歌曲播放方法。 SetFileSource、SetStreamSource 和 SetUriSource。只能从前台应用程序调用其中之一,即 SetUriSource 方法。其他需要从您的任务中使用。原因是后台播放器无法访问 SetFIleSource 或 SetStreamSource 所在的内存,除非在任务中设置。
在哪里可以阅读有关 WP8.1 的高级信息? 谢谢你的提前。
【问题讨论】:
标签: c# audio windows-phone-8.1