Solved

Check network connection to html page Silverlight

Posted on 2011-02-11
4
507 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

734 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