NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 57 58 59 60 61 … 93 Next »
Dissabling video resume by code?

 
  • 0 Vote(s) - 0 Average
Dissabling video resume by code?
cybershaman
Offline

Junior Member

Posts: 32
Threads: 5
Joined: Apr 2006
#1
2006-04-25, 03:57 PM
Hi,

I wrote a small plugin for viewing online streaming videos. It works well, but i'm having problems with the resume function of GB-PVR. I love that function in local videos but it doesn't work very well when watching streams. I'm using this to lauch the video:

PluginHelperFactory.getPluginHelper().PlayVideoFile(url,null,url);

Is there a way to dissable resume before launching video? Or maybe i could remove the url from the resume database, where ever that may be? Ideas?

PS. I'm a Delphi coder so i'm pretty lost with .NET.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2006-04-25, 04:41 PM
Sorry, no. At the moment there isnt a publically accessible way to avoid the resume prompt programmatically.

You can disable resume prompting in the config app though.
cybershaman
Offline

Junior Member

Posts: 32
Threads: 5
Joined: Apr 2006
#3
2006-04-25, 05:09 PM
Hmm, i tried to delete the resume record before playing the video and it seems to work.

Code:
public void PlayVideo(string VidUrl)
{
    // Delete resume data
    string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\devnz\\gbpvr\\gbpvr.mdb";

    OleDbConnection myConnection = new OleDbConnection( connectionString );
    myConnection.Open();

    string query = "delete from PLAYBACK_POSITION where filename = '" + VidUrl +"'";

    OleDbCommand myCommand = new OleDbCommand();
    myCommand.CommandText = query;
    myCommand.Connection = myConnection;
    myCommand.ExecuteNonQuery();

    myConnection.Close();

    //Play video
    PluginHelperFactory.getPluginHelper().PlayVideoFile(VidUrl,null,VidUrl);
}

I have no idea if this is a good/safe thing to do. Any feedback? :confused:
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#4
2006-04-25, 05:15 PM
Its not a good idea to connect directly to the database, but I dont have any alternative for you.
cybershaman
Offline

Junior Member

Posts: 32
Threads: 5
Joined: Apr 2006
#5
2006-04-25, 05:24 PM
Ok, thanks.

I guess i'll use this method for now. If/when it blows up my system, i'll try something else Big Grin.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#6
2006-04-25, 05:31 PM
Be aware though, I do know this will be broken by the release in the next few weeks, so you'll need to do a few changes when that happens.
cybershaman
Offline

Junior Member

Posts: 32
Threads: 5
Joined: Apr 2006
#7
2006-04-25, 05:35 PM
That's ok.
I'm writing this plugin just to learn something about .NET and GB-PVR.

BTW. I was wondering if there's a way to get the graph status, so i could display something to indicate when the stream is buffering.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#8
2006-04-25, 05:47 PM
Quote:BTW. I was wondering if there's a way to get the graph status, so i could display something to indicate when the stream is buffering.
No there isnt. I dont want to expose this sort of low level stuff.
cybershaman
Offline

Junior Member

Posts: 32
Threads: 5
Joined: Apr 2006
#9
2006-04-25, 06:58 PM
Ok, no problem.

Thanks for your help. Smile
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Video streaming URL and parameters? cncb 1 1,759 2021-10-22, 06:58 PM
Last Post: sub
  Extras device - using hardware video encoder gdogg371 6 3,148 2021-03-09, 12:18 AM
Last Post: gdogg371
  Loading Local Video Files Syler 25 6,338 2021-03-07, 09:20 PM
Last Post: Syler
  Remote control example code? drmargarit 4 3,717 2018-04-21, 11:24 PM
Last Post: drmargarit
  Looking for C# UPnP Media Server code bgowland 5 7,556 2016-12-16, 08:25 PM
Last Post: mvallevand
  Resuming a video imilne 28 14,391 2016-10-30, 09:27 PM
Last Post: mvallevand
  How to tell when video playback has finished in web client? cncb 6 4,200 2015-09-29, 08:07 PM
Last Post: cncb
  VIdeo playback from plugin mvallevand 5 3,421 2015-08-06, 10:43 PM
Last Post: sub
  Inset Video - Stop mvallevand 2 2,054 2013-08-07, 09:57 PM
Last Post: mvallevand
  Video Library Fanart Transparency tieke 7 3,847 2013-01-09, 08:23 AM
Last Post: tieke

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode