-
Notifications
You must be signed in to change notification settings - Fork 0
Fireshow API is open and anyone can create a server for it.
The currently available servers are listed on the main README.md file as well as the official website.
Once you finish your server, please send us a pull request editing README.md file on the master branch, adding your server at the table, as well as on the gh-pages branch, to update it at the website. If you don't know/don't have time, then just create a bug report and we will do it.
Please note that all servers must be open-source to be listed here. You can create a closed server, but as we are not sure of what our users are running (as we can't see the source code), we won't list it here.
As anyone can create a server or a client for it, this documentation creates a standard, so everyone who wants to code for Fireshow must follow it.
First, all the communication between the client and the server must be HTTP. Hybrid clients may make use of Ajax.
The return must always be JSONP and the callback is sent on the "callback" URL parameter.
Each request has the following template:
http://<server url>:<port>/<server password>/<command[-<parameter]>?callback=<callback name>
Note that, if you're creating a hybrid client using jQuery to make your JSONP Ajax calls, you must use:
?callback=?
Examples (without the server:port):
/1234/next?callback=mycallbackfunc
/1234/picture?callback=receiveslidepicturefunc
/1234/goto-3?callback=void
All requests, as said above, must return a JSONP valid format. In other words, just a Javascript file calling a function giving, as argument, the output. For example, if you call "isfireshow" function, that you will see below, you will call:
http://server:port/anypwdisvalid/isfireshow?callback=myFunc
It will return:
myFunc("yes");
All functions gives as argument just a simple string. On this docs, we will show just the argument as the output.
In some cases, Fireshow servers must return a common response. Here are them:
The password is wrong.
The requested command was unrecognized.
There's no PowerPoint presentation showing on the server.
Most of the commands are simple. Just one of them receive a parameter (goto
).
Also, all of them require password to be executed (obviously). Except one (isfireshow
). In this case, you don't remove the password part of the URL: just put any password, anything will be accepted.
Checks if the remote server is running Fireshow.
Returns yes
.
Checks if a password is valid.
This is a simple verification request like isfireshow. The only difference is that this one validates the password.
Returns ok
if the password is valid or invalidpwd
if the password is invalid.
Gets current slide's picture as a PNG image in a base64-encoded data URI scheme (data:image/png;base64,...
) that can be put directly into a <img>
tag's src
attribute, for example.
Returns the slide notes. Just that.
Returns the current slide's number. Note that the first slide is "1", not "0" (Pascal-like, not C-like).
Returns the last slide's number (the slides amount on the current presentation).
Advance to the next slide.
Return to the previous slide.
Goes to the first slide.
Goes to the last slide.
This function expects for an argument. This means you must use it on the form goto-n
, where "n" is the slide number you want to go.
Closes the presentation.
Starts the presentation (assuming the presentation file is opened on the server, but not presenting).
Toggles black screen. Note that this may not work on most of the clients (as the official one) due to a possible bug on PPT interface.