- Posts: 339
- Thank you received: 28
Arbitrary custom JavaScript in scenes?
- andrew
- Topic Author
- Offline
- User
-
Less
More
2 years 6 months ago #77
by andrew
Arbitrary custom JavaScript in scenes? was created by andrew
If scenes are written in HTML/CSS/JavaScript and rendered in a 'normal' browser (whether on a tablet or on the SmartRemote UI) then does that mean we can use any JavaScript we like on top of the stuff that's in there to make myServer communications work? I'm thinking of for instance a Kodi scene which could use a POST request to the Kodi jsonrpc to get the TV shows in progress, then get an image for each one, then show the thumbnails in the scene most recent first and let you click/touch one to go to it straight away. Like you can have on the Kodi main menu. Is that sort of thing supported? I'll be able to answer my own questions as soon as I get my hands on myserver but my enthusiasm is getting the better of me.
Andrew
Andrew
Please Log in to join the conversation.
- David Li
- Offline
- Admin
-
Less
More
- Posts: 1019
- Thank you received: 99
2 years 6 months ago #78
by David Li
Replied by David Li on topic Arbitrary custom JavaScript in scenes?
It might be technically feasible but highly discouraged as you would be on a different javascript version and no longer supported.
Better would be to illustrate what your end goal is and then let us take a look.
BTW, we already had a Kodi app that was very capable...maybe that's what you really need.
Better would be to illustrate what your end goal is and then let us take a look.
BTW, we already had a Kodi app that was very capable...maybe that's what you really need.
Please Log in to join the conversation.
- andrew
- Topic Author
- Offline
- User
-
Less
More
- Posts: 339
- Thank you received: 28
2 years 6 months ago #81
by andrew
Replied by andrew on topic Arbitrary custom JavaScript in scenes?
I wasn't talking about replacing the version of JavaScript in use. Just adding extra code (new .js files) to do clever stuff like display thumbnails of recently watched TV shows using the Kodi API.
Andrew
Andrew
Please Log in to join the conversation.
- davep
- Offline
- Admin
-
Less
More
- Posts: 367
- Thank you received: 96
2 years 6 months ago #147
by davep
Replied by davep on topic Arbitrary custom JavaScript in scenes?
The UI is all standard html, JavaScript and CSS. All of the web objects you see in the designer are standard web components written in Typescript. You could inject your own script and code but I highly recommend getting used to the tools that the designer already provides. If you start rolling your own you will run into issues when you edit the pages in the designer. I'd rather you become fluent in what the designer can do and suggest new web objects.
For your Kodi example there is already an Endless List web component that consumes a rest api and displays images as one of it's options. You'll see that come into play when the Plex, Emby, Jellyfin and Kodi drivers are released. Watch this space...
For your Kodi example there is already an Endless List web component that consumes a rest api and displays images as one of it's options. You'll see that come into play when the Plex, Emby, Jellyfin and Kodi drivers are released. Watch this space...
Please Log in to join the conversation.
- andrew
- Topic Author
- Offline
- User
-
Less
More
- Posts: 339
- Thank you received: 28
2 years 6 months ago #151
by andrew
Andrew
Replied by andrew on topic Arbitrary custom JavaScript in scenes?
Well that sounds extremely interesting. I'm afraid it's the lack of (complete) documentation that's prompting a lot of these questions. I saw there was an endless list in the web components toolbox (those YouTube tutorials are really useful, hint, hint...) but it didn't occur to me it'd be able to pull in data from an outside source. Really looking forward to getting my hands on this stuff, especially as our Harmony system locked up again today when trying to start any activities (individual device commands - fine, start an activity - nothing)....For your Kodi example there is already an Endless List web component that consumes a rest api and displays images as one of it's options. You'll see that come into play when the Plex, Emby, Jellyfin and Kodi drivers are released. Watch this space...
...
Andrew
Please Log in to join the conversation.
- davep
- Offline
- Admin
-
Less
More
- Posts: 367
- Thank you received: 96
2 years 6 months ago #154
by davep
Replied by davep on topic Arbitrary custom JavaScript in scenes?
Yes we have a lot of YouTube videos in the queue. Everyone is finding them very useful. Later today there is a video going up in doing a first time setup of myServer and SmartRemote.
Please Log in to join the conversation.
Time to create page: 0.201 seconds