HttpWebRequest from AudioPlayerAgent

后端 未结 2 2014
生来不讨喜
生来不讨喜 2021-01-16 16:34

I\'m creating an app that plays an endless audio stream. There is a separate web service that I can query to get the title and artist of the currently playing track. What I

2条回答
  •  被撕碎了的回忆
    2021-01-16 17:07

    This has to do with the AudioPlayer going out of scope after it begins playing the music. The AudioPlayer only lives for a fraction of time and it terminated after the call to NotifyComplete

    Take a look at my reply to this post: AudioPlayerAgent, timer and webservice

    More info: The background audio thread will "suspend" after NotifyComplete is called. The way back in is when the user changes play (OnUserAction), or when the song ends (OnPlayStateChanged). If you will continue to play, get the new info within the OnPlayStateChanged method.

提交回复
热议问题