Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Check network connection to html page Silverlight

Posted on 2011-02-11
4
Medium Priority
?
514 Views
Last Modified: 2012-05-11
I'm using the WebBrowser control in SL4 to stream a flash player from a html page on the local server.

This all works great, but sometimes the player pauses, if the 3rd party provider of the live feed performs a scheduled reboot. So, I somehow need to detect if the player is not streaming.

The only way I could think to do this si to monitor the network connection to the local server hmlt page, and change the source of the webbrowser if no data is being received.

Anyone know how I can do this?
0
Comment
Question by:wint100
  • 3
4 Comments
 
LVL 51

Assisted Solution

by:Ted Bouskill
Ted Bouskill earned 2000 total points
ID: 34880042
Well technically there isn't a connection to the HTML page.  As soon as a browser receives a copy of a web page the connection is broken.  Client side JavaScript will poll a server at regular intervals to get partial updates without a full page round trip however, once again those connections are not permanent and only long enough to get the data for each transaction.  This design allows the web server to reuse sockets to service more clients.  Why keep a connection open when no data might be travelling back and forth?

Streaming players use UDP (different than the TCP in a web page) to stream the media.  UDP isn't a direct connection between two computers.  This is a quick and simple explanation: http://wiki.answers.com/Q/What_is_the_difference_between_TCP_and_UDP

I'd encourage you to read more by searching for more articles.

So, if the remote UDP server goes offline it's hard to tell because you don't have a direct connection.  The packets might simply be lost alone the way.

Generally you have to detect this issues with the player itself which would have a timeout to detect that no new content has arrived for a long time.
0
 
LVL 1

Assisted Solution

by:wint100
wint100 earned 0 total points
ID: 34880097
That's a great reply and very good info to know.

Excellent,Thanks.
0
 
LVL 1

Accepted Solution

by:
wint100 earned 0 total points
ID: 34998215
I found that using a Javascript timer, I could check the status of the FlashPlayer, and fire the Start() method if it was Idle.

Thanks
0
 
LVL 1

Author Closing Comment

by:wint100
ID: 35042520
Problem solved
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
While working on Silverlight and WCF application, I faced one issue where fault exception occurred at WCF operation contract is not getting propagated to Silverlight client. So after searching net I came to know that it was behavior by default for s…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Loops Section Overview
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question