Playlist in SMF

Jul 30, 2010 at 11:14 AM

Hi,

(sorry for my english)

I have a question about playlists in SMFPlayer.
Is it possible that the transition between successive list items were not visible to the end user ?
In my list I have several items, when an item ends, the next item begins to play, but the break
 between the item is noticeable. How can I get rid of a break in play ?

 

Thanks,

Jul 30, 2010 at 1:21 PM

That's a good question and unfortunately I don't think there is an easy answer. It will require either modifying the SMF source code or extensively overriding its methods in your own subclass. Basically what you'd need to do on PlayListItemChanged is to start off your first item, then load up another MediaPlugin in the background for the next item in the list. Whent he first one is done, you can quickly switch to the next one. And when switching to that next one you preload the one after that.

This could get rather touchy since now you also need to watch for all the events on the PreloadMediaPlugin so if the video fails to load you preload the next.

One way of approach subscribe to the event OnPlayListItemChanged.

  • Then take the next item in the playlist and call SelectMediaPlugin(NextPlaylistItem) to get the media plugin for the next item
  • Load that MediaPlugin into a new property PreloadMediaPlugin, make sure to handle the relavent events for this plugin. Like if the media fails to load you move onto the next playlist item
  • Assign the MediaPlugin the source and have it load the video in a stopped state
  • The next part may be tricky, when the current video is done playing you'll need to intercept the event before SMF starts moving onto the next item on its own and loading up it's own MediaPlugin (this happens in OnCurrentPlaylistItemChanged()) At this point you'd want to replace the ActiveMediaPlugin with the PreloadMediaPlugin and start playing the video.
  • Then you can start the process all over by moving onto the next item in the line and preloading it.

A lot of things will need to be handled. OnCurrentPlaylistItemChanged handles loading captions and chapters, OnMediaPluginLoaded also handles tons wireup. This should only really be called when you play the first item or when the preload is put in place of the active media plugin. There are many other nuances

That all being said I know that SMF has been used for doing multiple playing videos at the same time. Like doing multi-angle display for Sunday Night Football. I just haven't seen any example of how to set this up or have seen any indication how to do it.

Jul 30, 2010 at 2:07 PM

Hi darthobiwan,

Thanks for your comprehensive answer.
It appears that this is not a trivial problem :(
Thanks again.