Solved

Check network connection to html page Silverlight

Posted on 2011-02-11
4
501 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:tedbilly
tedbilly earned 500 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now