Sample Slide for Pulling Display Id

  • 1
  • Question
  • Updated 3 years ago
This issue is raised several times with no resolution so far.
I would need to pull the display id parameter at the client side in order to merged it as a parameter in URL GET call. I would need to identify the user using his display id parameter.
My you please provide with some sample slide or full functioning code that can demonstrate of how to retrieve the display id parameter?
Do you have any widget/gadget that can be programmed to do this only job?
Thx.
Photo of Amit Amit

Amit Amit

  • 100 Points 100 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Blake Freeman

Blake Freeman, Official Rep

  • 36,116 Points 20k badge 2x thumb
Hi Amit,

We do not provide a widget or gadget that does this specific action. I am not a developer, so I cannot tell you specifically how to accomplish what you're wanting to do. However, have you checked over developer documentation on core.display.get? Please let me know if this answers your question. If it does not, I'll be happy to get a developer to look at your question.
Photo of Amit Amit

Amit Amit

  • 100 Points 100 badge 2x thumb
It doesn't help. 
Using the Core API requires authentication with OAuth2. I guess a simple end-point player does not create OAuth2. It only delivering its "Display ID" to the server.
I need some script to pull this "Display ID" parameter at the client side, so I can put for example a slide contain of such message: "Welcome to our system " + Display ID + "!".
Many threads here are encountering with the same issue asking for end-to-end code sample to solve it without any resolution from you guys.
Please assist using your development team.
Photo of Robb

Robb, Official Rep

  • 76,676 Points 50k badge 2x thumb
Amit,

If all you want to do is show the Display ID, you may want to consider something far more simple; In Windows, the Display ID is stored in C:\Users\%Username%\AppData\Local\rvplayer\RiseDisplayNetworkII.ini, and in Linux it is stored in home\rvplayer\RiseDisplayNetworkII.ini. There is other text in those text files, but you should be able to grab what you need from those files to show them in a simple slide in a Presentation.

Does that help?
Photo of Amit Amit

Amit Amit

  • 100 Points 100 badge 2x thumb
Sorry, I guess it doesn't help.

Rise Vision client side presentation is running within Chrome browser as a web application. Web applications do not have the security privileges to get outside of its virtual browser environment in order to query and mess up with the file system. Otherwise, any web malware could erase our entire disk freely. In some way, the DisplayID parameter is running within the web session itself, and probably can be exposed using some javascript code. The javascript code runs within the web application session and can send back the parameter using simple web transaction.

We would all need script sample of this kind. Please.

Photo of Wendi Borden

Wendi Borden, Champion

  • 6,028 Points 5k badge 2x thumb
I just did a quick JavaScript to pull the URL from the browser..

<!DOCTYPE html><html>
<body onload="getURL()">

<p id="url"></p>

<script>
function getURL() {
    var url = window.location;

    document.getElementById("url").innerHTML = url;
}
</script>

</body>
</html> 

You can add this by editing the Presentation HTML or add an HTML Item. You can also use the HTML Widget, but it's escaped (just remember %3D is the same as =)

I just tested it out in Preview and it appeared fine. I threw it on a box and you can see the full URL. You could then parse out the displayId by editing the JavaScript above.

Be very careful. Yes you can use that URL in any browser, but you're going to cause yourself a headache with duplicate Display IDs, etc. I wouldn't recommend it. It is a way for you to see the Display ID on a working monitor though.
Photo of Ashleigh

Ashleigh

  • 3,740 Points 3k badge 2x thumb
Thanks for sharing Wendi!
Photo of Wendi Borden

Wendi Borden, Champion

  • 6,028 Points 5k badge 2x thumb
Just another note for Chrome Devices, you could add a Web Page widget displaying the following:

http://localhost:9449/config

I assume this also works for anything using the Chrome App. You could put this in it's own presentation or do an iframe (in an HTML widget) inside of any other presentation. I assume that should work.

Take care again, because opening that config will also give the ability to *change* the display ID if you plug in a keyboard ;)

I think the first method would be the most universal.
Photo of Robb

Robb, Official Rep

  • 76,676 Points 50k badge 2x thumb
Amit,

Will Wendi's suggestions work for you?