This project has moved. For the latest updates, please go here.

config time to connect to server streaming

Jul 22, 2013 at 3:01 PM
How can I config the timeout when connect to the streaming server. I created an app with 2 channel. When open the apps, channl1 will open default. but when I click on button channel2, sometime it play, sometime it cannot due to the timeout connection.tks
Jul 23, 2013 at 5:55 PM
Is it an HTTP timeout your are seeing or is it the MediaElement timing out?

Which application(s) are you basing your code on (e.g., HlsView, SamplePlayer.WP8)?

Do you try to stop the current stream before starting the next?

Are you using the binary build or the latest source? There have been some significant changes. Among other things, the tree switched over to Microsoft.Net.Http shortly after the binary build.

I've been meaning to do another binary build but I have wanted to get in a fix for the stuff discussed in "Audio isnt synced with video?" and to track down an apparent race condition which sometimes prevents the stream from playing (I don't know if this predates the existing binary build). Having summer turn my home office into an oven hasn't helped things along...

If you are using the latest code and you are having HTTP timeout issues, then you should be able to customize the HttpClient by modifying or (as of a few minutes ago) extending the HttpClients factory class.

If you are using the binary build and have VS2012 Pro or better, then try the latest source code (click the "Download" link on the Source Code page). There were some changes that reduced the time it takes to stop playing an existing stream and to change the buffering algorithm (one may still want to muck with the constants at the top of BufferingManager.cs since the BM doesn't know the bitrate it should expect).