Playing just a clip from a Play List Item in a playlist

Feb 2, 2011 at 11:47 AM

We need to be able to only play a portion of a larger file as a playlist element. So we want to allow the user to watch from 00:05 -> 01:30 for instance out of a file that may be 30:00 long. Is this possible with the PlayList class ? If not could we extend it to allow such composition?

Feb 2, 2011 at 3:44 PM

Neilthespod, one way to do this would be to programmatically jump to a position in the video by using SMFPlayer.SeekToPosition and then check SMFPlayer.PlaybackPosition from a timer to see if you've passed the end position. 

Another, more generic way might be to add markers to indicate when to start and stop. You'd still have to write code to tell the player to seek to the first marker but you could then wait in the SMFPlayer.MarkerReached eventhandler to know when the 2nd marker has been reached.

Hope that helps,

Tim Greenfield


Feb 3, 2011 at 10:01 AM

Thanks for this Tim, the first option you discuss is the one we are thinking of.

To explain more fully, what we want is basically an ad supported player where when chapter points are passed or skipped over 1 or more adverts plays before playback of the media continues. Is this a supported or planned scenario - Playlists + adverts as implemented seem designed for separate media in the playlist with no concept of timecodes within media being the point for ad insertion.