I'm having trouble playing music across multiple pages in my app. I want to create the MediaElement in mt App.XAML / App.xaml.vb so that I can access it from anywhere in my app. However, when doing this the MediaEnded event doesn't fire when a piece of music ends (at this point I want to change the track). So the first track ends and the music stops instead of moving to the next track.
There seems to be an issue (or feature...) that prevents a MediaElement from firing events from the App.XAM (I posted an unanswered question about this here: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/da9029be-4333-4d68-b2bb-9d7eb60286e0/why-wont-my-mediaelementmediaended-event-fire).
So how can I use a MediaElement in the way I want - to persist across all pages, and to be controllable from those other pages if required (e.g. turning music off/on and adjusting volume)?
This is background music for a game - not music that the player should be controlling via the playback controls, nor should the music continue when the games is off-screen or closed.
I'm a self-taught noob amateur. Please take this into account when responding to my posts or when taking advice from me.
No comments:
Post a Comment