Silverlight HVP Design Update

 

SLHvpLogo
This blog post is part of the documentation for the Silverlight HyperVideo Player Open Source Project

Design Change:

  1. Create an Interface: IMarkerEventHandler
  2. Optionally derive a base class MarkerEventHandler that implements the interface
  3. Instantiate MarkerEventHandler classes that are decoupled from the HyperVideo player

This change is designed to decouple the response to markers in a video from the other responsibilities of the Silverlight HyperVideo player.

IMEH 
[Click on image for full size]

Each MEH encapsulates a strategy for responding to markers.

Here are four examples of how a MEH might interact with markers.

  • Heartbeat markers – every n seconds, used as lookups into a data source to see if there is an action at that time
  • Synchronization markers – at known times, used to resynchronize, but the logic for what happens at a given time is independent of any marker event
  • Meaningful Markers  – traditional use of a marker that tells you what time it was raised and identifies what the marker indicates (tied to an event in the video)
  • Null marker – the MEH is responsible for whatever we choose but does not depend on markers in the video

There is, potentially, more than one way to have an MEH associated with a HyperVideo player:

Option 1: The HVP will have-a MarkerHandler. As the video is played, if a marker is encountered the HVP will invoke a method on the contained MarkerHandler.

Option 2: (Looser coupled). The application will instantiate a player and a MEH object and when the player encounters a marker it will raise an event to which the MEH will subscribe. If the MEH needs to have the player take an action (e.g., pause or resume) the MEH will fire an event to which the player will subscribe.

These ideas are not fully developed but are thought through enough to move forward and with luck, sufficiently flexible to be easily modified as design emerges.

 

Details about the Silverlight HyperVideo Player Project can be found at our CodePlex Site and information on joining the Development effort can be found on the Developer Page within the project documentation.

About Jesse Liberty

Jesse Liberty has three decades of experience writing and delivering software projects and is the author of 2 dozen books and a couple dozen online courses. His latest book, Building APIs with .NET will be released early in 2025. Liberty is a Senior SW Engineer for CNH and he was a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a Microsoft MVP.
This entry was posted in HyperVideo Player and tagged . Bookmark the permalink.