July 16, 2019, 07:05:18 AM
Welcome, Guest. Please login or register
News: Stay up to date with everything that's happening at http://plus.digitalsignage.com

MediaSignage support forum



Author Topic: API Use sendSnapshot  (Read 3272 times)

blackfox123

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0
    • View Profile
API Use sendSnapshot
« 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?


admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 4946
  • Karma: +35/-8
    • View Profile
Re: API Use sendSnapshot
« Reply #1 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);
        },



blackfox123

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0
    • View Profile
Re: API Use sendSnapshot
« Reply #2 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?

mati 6

  • Newbie
  • *
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: API Use sendSnapshot
« Reply #3 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


admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 4946
  • Karma: +35/-8
    • View Profile
Re: API Use sendSnapshot
« Reply #4 on: June 05, 2016, 07:18:13 AM »
it's the above post and all code here: https://github.com/born2net/signagestudio_web-lite

 

Carbonate design by Bloc
variant: carbon
SMF 2.0.12 | SMF © 2016, Simple Machines