Polling Video – A Viable sub-second alternative?

An interesting suggestion was made with regard to my intended use of embedded “heartbeat” markers.  Mike Loynd (WL) referred me to this fascinating article by John Deutscher (PM for IIS Media).  That caused me to experiment with the following code in the HVP Silverlight Video Player,

public partial class Player : Page
{
  private readonly DispatcherTimer timer;

  public Player()
  {
    InitializeComponent();
    timer = new DispatcherTimer { Interval = new TimeSpan( 500 ) };
    timer.Tick += new EventHandler( timer_Tick );
    timer.Start();
  }

  void timer_Tick(object sender, EventArgs e)
  {
    var position = CoreMedia.Position;
    var minutes = position.Minutes;
    var seconds = position.Seconds;
    var milliseconds = position.Milliseconds;
    TopPlaceHolder.Content =
       string.Format("{0:d2}:{1:d2}:{2:d4}",
       minutes, seconds, milliseconds);
  }
 from Jesse Liberty         more here
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • MisterWong
  • Y!GG
  • Webnews
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • XING
This entry was posted in Video and tagged , , , . Bookmark the permalink.

Leave a Reply