Silverlight HVP Design Update - Jesse Liberty - Silverlight Geek Page view counter

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.

Published Monday, December 28, 2009 12:03 PM by jesseliberty
Filed under: ,

Comments

# Silverlight HVP Design Update - Jesse Liberty - Silverlight Geek Silverlight Web

Pingback from  Silverlight HVP Design Update - Jesse Liberty - Silverlight Geek Silverlight Web

# Social comments and analytics for this post

This post was mentioned on Twitter by JesseLiberty: New blog post: http://tinyurl.com/y89k7r2 - Silverlight HVP Design Update

Monday, December 28, 2009 1:49 PM by uberVU - social comments

# Silverlight HVP Design Update - Jesse Liberty - Silverlight Geek Silverlight Blog

Pingback from  Silverlight HVP Design Update - Jesse Liberty - Silverlight Geek Silverlight Blog

# re: Silverlight HVP Design Update

I know you have mentioned PRISM as a possibility on later versions of the HVP, but the Event Aggregator seems like such a natural fit for Option 2 that it may deserve consideration. Since PRISM is so modular, the player could limit itself to just that feature, and it would save some coding work.

Using the aggregator is really simple and the publisher/subscriber model allows for expansion and enhanced uses for the events.

Just an idea on the table.

David

Monday, December 28, 2009 1:56 PM by DavidMora

# Silverlight HVP Design – Configuration & Scenarios

  Design Update   This blog post extends the  previous post in which I discussed the IMarkerEventHandler

Tuesday, December 29, 2009 9:30 PM by Jesse Liberty - Silverlight Geek

# Silverlight HVP Design – Configuration & Scenarios

  Design Update   This blog post extends the  previous post in which I discussed the IMarkerEventHandler

Tuesday, December 29, 2009 10:18 PM by Microsoft Weblogs

# Silverlight Cream for December 29, 2009 -- #766

In this Issue: John McFetridge , Fredrik Normén ( 2 , 3 ), Jeff Blankenburg , Rishi , and Expression

Wednesday, December 30, 2009 12:57 AM by Community Blogs

# Silverlight HyperVideo Player Design ??? Configuration & Scenarios

Pingback from  Silverlight HyperVideo Player Design ??? Configuration & Scenarios