![]() |
|
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. |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
UIContext Help
I am playing around with sagex api (javascript version you put in the sagex directory), but I cannot figure out how to pass a UIContext to the Watch command. Any ideas? I have found examples for java and for the URL api, but cant figure out how to declare a new context in the javascript.
I am using Sage Opensource, but it says my Sagex is at 7.1.9.1. Is this normal? My eventual (lofty) goal is to make an alexa skill that will search for a show and play it on a extender. I can already use sagex to: Search for airing Get Media file from the airing return Show/Episode Title in json Once I can watch, I will tackle the alexa part yet, but should be straightforward if a single URL call. Last edited by jonnydeath; 04-22-2016 at 04:31 AM. |
#2
|
||||
|
||||
In most cases the UIContext parameter is not needed. Just use the form of the API that does not require the UIContext parameter.
__________________
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. |
#3
|
||||
|
||||
Quote:
sagex is independent of SageTV (it's an add-on). 7.1.9.x means that the API for sagex is at 7.1.9, and I haven't created a 9.0.x sagex, yet.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#4
|
|||
|
|||
I am honored you replied, but I just can't get it. In the javascript called by:
http://ip ![]() MediaPlayerAPI.Watch(mf); % This does not error, but does not play ---------- var names = Global.GetConnectedClients(); MediaPlayerAPI.Watch(names[0],mf); % Gives: Can't find method sagex.api.MediaPlayerAPI.Watch(java.lang.String,sage.MediaFile) ------ MediaPlayerAPI.Watch(UIContext(names[0]),mf); % Gives:"UIContext" is not defined. |
#5
|
||||
|
||||
Quote:
Quote:
so you might need to do this... Code:
var UIContext = Packages.sagex.UIContext; var names = Global.GetConnectedClients(); MediaPlayerAPI.Watch(new UIContext(names[0]),mf);
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#6
|
|||
|
|||
Thank you. Works.
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Detecting UIContext Type? | broconne | SageTV Studio | 12 | 04-06-2011 07:10 AM |
Getting a valid UIContext from 3rd party apis | razrsharpe | SageTV Studio | 3 | 12-16-2009 10:05 PM |
6.4.8 Broken "new API(uiContext)"? | Fonceur | SageTV Beta Test Software | 10 | 08-18-2008 10:41 PM |