Results 1 to 3 of 3

Thread: Resuming a video

  1. #1
    Join Date
    Feb 2008
    Location
    Scotland, UK
    Posts
    2,102

    Resuming a video

    The following "seems" to work:

    Code:
    Int32 duration = new Int32();
    int position = PlaybackPositionHelper.GetPlaybackPosition(path, out duration);
    
    PluginHelperFactory.GetPluginHelper().PlayVideoFile(path);
    
    IPlaybackProxy proxy = PluginHelperFactory.GetPluginHelper().GetPlaybackProxy();
    proxy.SetPosition(position);
    But like most code pulled from the innards of an API I don't really understand, I'd like to know if it's ok?

    Thanks

    Iain
    NPVR Plugins: AudioAdjust | AutoRefresh | MediaInfo | MovieTrailers | ReClockOrNot | SubMenu | System | Videos+

  2. #2
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    76,022
    Yep, that should be ok. From memory the Video Library does the same thing.

  3. #3
    Join Date
    Feb 2008
    Location
    Scotland, UK
    Posts
    2,102
    Quote Originally Posted by sub View Post
    Yep, that should be ok.
    Excellent, thanks.

    Quote Originally Posted by sub View Post
    From memory the Video Library does the same thing.
    That's pretty much how I worked it out. A combination of browsing the API and looking at the log messages produced by the Video Library. That's what gave the clue to setting the resume position *after* starting the video

    Iain
    NPVR Plugins: AudioAdjust | AutoRefresh | MediaInfo | MovieTrailers | ReClockOrNot | SubMenu | System | Videos+

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •