MediaPlayerLauncher对WP7 - 如何恢复以前播放媒体? [英] MediaPlayerLauncher on WP7 - how to resume previously playing media?
问题描述
我使用的是MediaPlayerLauncher展现在我的WP7应用movietrailers,像这样的:
I'm using a MediaPlayerLauncher to show movietrailers in my WP7 application, like this:
MediaPlayerLauncher mpl = new MediaPlayerLauncher();
mpl.Media = new Uri(trailerUrl, UriKind.Absolute);
mpl.Controls = MediaPlaybackControls.All;
mpl.Show();
这工作得很好,除了一件事:如果用户已经在后台听音乐,并推出预告片,音乐是不是该拖车是做打后恢复(或者,如果用户关闭了视频)。
This works just fine, except one thing: if the user is already listening to music in the background, and launch a trailer, the music is not resumed after the trailer is done playing (or if the user closes the video).
有谁知道我可以恢复以前播放音乐/媒体,如果能行得通吗?
Does anyone know how i can resume the previously playing music/media, if even possible?
推荐答案
想通了。调用MediaPlayer.Resume()演出后右()解决了这个问题:
Figured it out. Calling MediaPlayer.Resume() right after show() solves the issue:
mpl.Media = new Uri(trailerurl, UriKind.Absolute);
mpl.Controls = MediaPlaybackControls.All;
mpl.Show();
MediaPlayer.Resume();
不过,我还是想知道如何恢复无线电和Spotify的!
However, i would still like to know how to resume radio and spotify!
这篇关于MediaPlayerLauncher对WP7 - 如何恢复以前播放媒体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!