How to get "Display name" or "Hardware Key" from HTML Package

Hi there. In my scenario I have to get current media id (preloaded to a player) from an external DSP using javaScript embeded in HTML5 Package and play it. Sure I have to put player_id (display name or hardware key) into the request to let DSP know what the player is (location, format, orientation, OTS, audience at the moment etc). And everything working fine except one little issue. I can’t find out how to get playerId on Android. I did it on Windows version just sending request to embeded webserver (http://localhost:9696/config.xml) but it doesnt work on Android player. So, my question is … Is there any way to get player “display name” or “hardware key” from HTML Package on Android player? Please, help me guys ) I Can’t believe it’s impossible and I only one who stuck on this issue.

It will enough if somebody just post me “Yes it’s possible. Dig deeper.” or “No it’s impossible”. Anybody? :slight_smile:

I’ve got a feature request for this here already: https://github.com/xibosignage/xibo/issues/2300 and will add a link to this topic to it.

Your solution for Windows is ingenious and something we will likely want to prevent, now that we know its possible (sorry :cry:). I wonder though whether we could add a Player side API which provided an endpoint for this, which is the same then on each Player (recorded here).

We’re in the final stages of testing a v2 R207 Android release and could look at adding this feature to it. It will likely be a few days before it is available, but I will post back here when it is.

1 Like

Thank you for response Dan. I just hope you will add Player side API method we can use to get display id BEFORE you fix the “bug” )
P.S. “hardwarekey” file ia also available for reading from HTML embeded JavaScript even if you use file protocol.
function getPlayerId() {
var rawFile = new XMLHttpRequest();
rawFile.open(‘GET’, ‘…/hardwarekey’, false);
rawFile.onreadystatechange = function ()
{

WBR,
Nova

We released v2 R207 for Android yesterday and included is the http://localhost:9696/info endpoint which outputs some JSON containing the hardware key and name.

We will do the same, in the same format for windows.

{
  "hardwareKey": "",
  "displayName": "",
  "timeZone": ""
}

That is interesting and also surprising! I have made a note of that on the issue for windows and will investigate. Thank you.

Thank You, Dan. I am very grateful to you.

1 Like

I’ve completed this work in Windows for the next release.

If you want to try it out, there is a pre-release available here for the next 3 days: https://transfer.xibo.org.uk/c70ee7a2bab8

I missed a build step when producing the MSI :man_facepalming:

I’ve prepared another: https://transfer.xibo.org.uk/f65c92b4e1c6

Wow … I have lost for a couple of months )))
Great news, Dan. Now we can have a platform-independent HTML package. Thank You Very Much Again.

1 Like
The Xibo Community site uses cookies. What are cookies?