Hi, We want to use login manager to connect to milestone with a known user and password, doing so with javascript force us to store the credetials in a file on server that is in clear text. Is there any support of token in Javascript API?

What is the best way to handle a common user to show video?

Hello Harald,

There is a method in the XPMobileSDK called connectWithId. You can use this but you need a valid session GUID to log in

https://doc.developer.milestonesys.com/mipsdkmobile/reference/WebSDKdoc/global.html#connectWithId

I don’t know if this helps. If not then please share with us more details about the setup and what exactly are you trying to achieve.

Ok, thanks. We want to avoid the user to login, but use an system user that handle the login in. Using Javascript API, reveals tis information. We would be able to encrypt the password, and you would be able to se the code that is used if we just base us on using Javascript client API. Is there api for backend code to return a stream to the javascript API. The solution runs on intranet, the users that uses the ower app is identified, therefor we hoped to stream the video form a webservice that handle the autentication to Milestone. Is there APIs for this?

Update:

Just got informed that the users is part of AD. Is there support for Single Sign On?

Expand Post

Hello Harald,

We don’t support SSO yet on the mobile server and we also don’t support video streaming without authentication.

If I understood you correct there will be a JavaScript application that will call some webservice which will call Milestone to request video.

Can this webservice do the authentication on the background using the system user (hard coded somewhere in the service) and then notify the JavaScript application where is the video listener? This way the system user will not be revealed to the end user.

Kindly regards

Teodor

Hello,

please what does it mean “…notify Javascript application where is the video listener”?

We use Milestone .net component integration on Backend and MobileSDK in our javascript application.

Could this component integration provide valid session GUID to our javascript application? Can we use this session GUID and “connectWithId” method to log in on frontend?

Thanks for reply

In short yes you can.

What I mend by notify the application (Please consider that I have no idea what this application is) is that your backend can do a Login and then a RequestStream command for a video and in a response you will receive a VideoID (GUID) which represents the listener that is open on the MobileServer where you are connected to. The listener URL is something like http(s)://THE_DOMAIN_OR_IP_OF_MOS:8081(2)/XProtectMobile/Video/[GUID_FROM_REQUESTSTREAM]

So if you somehow send this video GUID to the app then you can directly consume the video without logging in.

I have made some video and examples that may help here: https://youtu.be/wQIrqyEu4TQ

I hope that help

The listener URL is exactly what I need. But how can I use it? I haven’t found how to use this URL in video you have sent.

Do I even need MobileSDK if I have this URL?

You can just open a WebSocket connection to that URL and start receiving messages. Each message is a frame that you can parse like described here : https://doc.developer.milestonesys.com/mipsdkmobile/reference/protocols/mobile_decoding.html

I guess I have to make a video tutorial about it some day.

Sorry realy late replay on this.

Yes, we have an Javascript Client application. Your suggestion could be a solution.

Thanks.

Harald