Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Check network connection to html page Silverlight

Posted on 2011-02-11
4
Medium Priority
?
511 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 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

Command Line Tips and Tricks

The command line is a powerful tool at the disposal of every Linux user. Although Linux distros come with beautiful user interfaces, it's worthwhile to learn the command line because it allows you to do a number of things that you otherwise cannot do from the GUI.  

Question has a verified solution.

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

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

715 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