MediaSignage support forum

community support => Open source Digital Signage => Topic started by: blackfox123 on October 21, 2014, 06:34:03 AM

Title: API Use sendSnapshot
Post by: blackfox123 on October 21, 2014, 06:34:03 AM
I wish to develop a small application for my office to give me an overview of all the screens I have, and a small snapshot every 5mins or something.

I can see within the API (pepper.js) there is a function sendSnapshot - there is very little documentation on how to incorporate pepper.js into our own applicaitons - it would be nice with a small quick howto?

Title: Re: API Use sendSnapshot
Post by: admin on October 21, 2014, 02:26:31 PM
1. authenticate:

Code: [Select]
dbConnect: function (i_user, i_pass, i_callBack) { ...

2. provide your station id: i_station to the function

Code: [Select]

/**
         Send a remote snapshot command for station id and wait for a call back.
         @method _sendSnapshotCommand
         @param {Number} i_station
         @return none
         **/
        _sendSnapshotCommand: function (i_station) {
            var self = this;
            var d = new Date().getTime();
            var path = pepper.sendSnapshot(d, 0.2, i_station, function (e) {
            });
            setTimeout(function () {
                self.m_imagePath = path;
            }, 3000);
        },


Title: Re: API Use sendSnapshot
Post by: blackfox123 on October 22, 2014, 06:27:23 AM

OK Great. Few questions. Do i just include the pepper.js in my script?
What is i_callback? I understand it's a @param {Function} i_callBack but in my case?
Title: Re: API Use sendSnapshot
Post by: mati 6 on May 31, 2016, 03:48:57 AM
Hello,
I'd like to refresh this topic.
We want to do exactly the same thing as blackfox123 did.

@blackfox123 - did you manage to create your small app ? Could you share it with me ?

Does anyone have a sample of complete code to get snapshot from a station ?

Regards

Title: Re: API Use sendSnapshot
Post by: admin on June 05, 2016, 07:18:13 AM
it's the above post and all code here: https://github.com/born2net/signagestudio_web-lite