SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-29-2020, 06:24 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
SageTV API questions

Using Sagex or some other method is there an easy way to :
  • playback MediaFile "123" in SageTV Context "456"?
  • With the current Media File that is playing back is there a way to move to 600 seconds (or whatever) on the file timeline?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #2  
Old 12-30-2020, 06:42 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wayner View Post
Using Sagex or some other method is there an easy way to :
  • playback MediaFile "123" in SageTV Context "456"?
  • With the current Media File that is playing back is there a way to move to 600 seconds (or whatever) on the file timeline?
If you go to the sagex/api directly from a browser, it has a full searchable help page.
Code:
http://192.168.1.10:8080/sagex/api
It explains (briefly) how the commands work. If you search for "Watch" you'll see a Watch command that takes a single argument. So you can call it like...
Code:
/sagex/api?c=Watch&1=mediafile:MEDIAFILEID
where MEDIAFILEID is the id of the file you want to play.
if you want to play it on a particular client...
Code:
/sagex/api?c=Watch&1=mediafile:MEDIAFILEID&context=UI_CONTEXT
where UI_CONTEXT the context ID of the client.

If you search for skip or seek, you'll find a couple of ways to do what you want.
Reply With Quote
  #3  
Old 12-30-2020, 11:16 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Thanks sean, that works with a couple of caveats.

When I issue the Watch command, as in: "http://192.168.1.99:7070/sagex/api?c=Watch&1=mediafile:41834038&context=0023a5000654"

The file starts playing but if I happen to be in the Main Menu it plays in the top right corner (this is with the Gemstone UI). And if you initiate this playback when the UI is in other states, like a file list, then you may not see video. How do you set playback to the full SageTV window as happens when you start playing back of file from the SageTV UI? In other words how do you make the video player take over so that the UI is no longer on the screen?

Seek Issue
I am trying to use the Seek function, but it isn't working. No matter what I use as an argument it starts at the beginning of the file. The docs say:
Quote:
Seek
public void Seek(long Time)
Performs a time seek in the MediaPlayer to the specified time. This time is relative to the start time of the metadata for the MediaFile unless a DVD is being played back. In the case of a DVD the time is absolute.
Parameters:
Time - the time to seek the MediaPlayer to in milliseconds
So if I want to do playback 10 seconds in then don't I pass it an argument of 10000, as in
Code:
http://192.168.1.99:7070/sagex/api?c=Seek&1=10000&context=0023a5000654
But when I do that it restarts play at the beginning. Am I getting the meaning of relative wrong here?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #4  
Old 12-30-2020, 02:25 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wayner View Post
Thanks sean, that works with a couple of caveats.

When I issue the Watch command, as in: "http://192.168.1.99:7070/sagex/api?c=Watch&1=mediafile:41834038&context=0023a5000654"

The file starts playing but if I happen to be in the Main Menu it plays in the top right corner (this is with the Gemstone UI). And if you initiate this playback when the UI is in other states, like a file list, then you may not see video. How do you set playback to the full SageTV window as happens when you start playing back of file from the SageTV UI? In other words how do you make the video player take over so that the UI is no longer on the screen?

Seek Issue
I am trying to use the Seek function, but it isn't working. No matter what I use as an argument it starts at the beginning of the file. The docs say:

So if I want to do playback 10 seconds in then don't I pass it an argument of 10000, as in
Code:
http://192.168.1.99:7070/sagex/api?c=Seek&1=10000&context=0023a5000654
But when I do that it restarts play at the beginning. Am I getting the meaning of relative wrong here?
I have a feeling Seek is seeking from the start of the playback time (which is probably 0). You can try SkipForward, which is likely relative.

As for the watch... if I recall in the stv after it calls watch it transitions to a "Menu" that ends up full screening the video and then providing the overlay controls. I'm sure this can be done from the REST api as well, I just have no idea what the menu/widet is
Reply With Quote
  #5  
Old 12-30-2020, 02:35 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
to go full screen you can try...
Code:
c=ExecuteWidgetChain&1=widget:QISRJ-234858
(with your ui context)

According to the Phoenix 3 stv, that is the id of the widget that launches into full screen.
Reply With Quote
  #6  
Old 12-30-2020, 03:28 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by stuckless View Post
to go full screen you can try...
Code:
c=ExecuteWidgetChain&1=widget:QISRJ-234858
(with your ui context)

According to the Phoenix 3 stv, that is the id of the widget that launches into full screen.
This didn't seem to work but I kind of have a workaround - press home so that you are on the home screen, issue the Watch command and then issue a Play keypress which makes it full screen again.

The Widget commands are likely specific to the UI, so I might need to find that for Gemstone.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #7  
Old 01-02-2021, 10:40 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by wayner View Post
Thanks sean, that works with a couple of caveats.

When I issue the Watch command, as in: "http://192.168.1.99:7070/sagex/api?c=Watch&1=mediafile:41834038&context=0023a5000654"

The file starts playing but if I happen to be in the Main Menu it plays in the top right corner (this is with the Gemstone UI). And if you initiate this playback when the UI is in other states, like a file list, then you may not see video. How do you set playback to the full SageTV window as happens when you start playing back of file from the SageTV UI? In other words how do you make the video player take over so that the UI is no longer on the screen?

Seek Issue
I am trying to use the Seek function, but it isn't working. No matter what I use as an argument it starts at the beginning of the file. The docs say:

So if I want to do playback 10 seconds in then don't I pass it an argument of 10000, as in
Code:
http://192.168.1.99:7070/sagex/api?c=Seek&1=10000&context=0023a5000654
But when I do that it restarts play at the beginning. Am I getting the meaning of relative wrong here?
To go to fullscreen use the API function that emulates sending the "watch" remote control button press. I forget the details, but that's how I used to do it.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #8  
Old 01-02-2021, 06:05 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Thanks Tom - it looks like the TV commands works with the webUI, as in: http://192.168.1.99:7070/sage/SageCo...654&command=TV

Any idea about moving to a point 600 seconds, on an absolute basis, into the file?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Considering SageTV Questions jrwalte SageTV Software 8 05-22-2011 04:50 PM
SageTV 7 questions Rogue9 SageTV v7 Customizations 4 10-12-2010 12:55 PM
Thank you SageTV, but I have questions . . . Squeeky4711 SageTV Software 4 09-06-2008 08:56 AM
SageTV Questions EdwardATeller SageTV Software 5 02-17-2008 07:49 AM
Have some questions on SageTV zofran SageTV Software 5 09-18-2004 12:28 PM


All times are GMT -6. The time now is 11:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.