Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've been trying to develop a ringtone app for windows phone 8. Ringtone are loaded from remote server. when preview button is tapped on, loading indicator is shown then after sometime play sound successfully and loading indicator goes to invisible.
But only for one audio file loading indicator remain visible (though sound is playing).
I debug BufferingProgressChanged and found maximum BufferingProgress value 0.300304 like this.
If that's why loading indicator remain visible. Now how should i do??? please suggest me.

C#
<pre lang="c#"><pre lang="c#">
RingtoneClass selectedRingtone = null;
<pre lang="text"><pre lang="text"><pre lang="text"><pre lang="text">

MediaElement myRingtonePalyer = new MediaElement();
private void playButton_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
myRingtonePalyer.BufferingProgressChanged += myRingtonePalyer_BufferingProgressChanged;
soundLoading.Visibility = Visibility.Visible;
var element = (FrameworkElement)sender;
selectedRingtone = (Ringtone)element.DataContext;
myRingtonePalyer.Source = new Uri(selectedRingtone.Source, UriKind.RelativeOrAbsolute);
myRingtonePalyer.Play();

}

private void myRingtonePalyer_BufferingProgressChanged(object sender, RoutedEventArgs e)
{
MediaElement m = sender as MediaElement;
double progressValue = m.BufferingProgress;
if progressValue>= 1)
{
soundLoading.Visibility = Visibility.Collapsed;
}
}
Posted
Comments
suzand 16-Jun-14 9:19am    
Please help me if you can

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900