Solved

Check network connection to html page Silverlight

Posted on 2011-02-11
4
504 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 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

17 Experts available now in Live!

Get 1:1 Help Now