Giter Site home page Giter Site logo

impresto.js's Introduction

impresto.js-1.0.0

im-/'prestō/ 'n': The client-side control of a one-to-many impress.js slide show. To be used with the sample.php or the Prestidigitation server when available.

About

Have you ever seen a TED or TEDx talk and wanted to do something similar? In large expensive talks and presentations you have a [wiki: teleprompter] displaying your script/notes and a 10ft viewable timer on stage, and a large projection screen/system displaying your content. Say you, as one person, want to be able to leverage the power of these tools to create or show your own talk in any scale? Say you want to have audience members all over the globe view the same talk that you are giving with audio piped in via some other media, and control what page they're viewing?

Impresto allows you to remotely control the page being viewed in other browsers while giving you easy to read notes and timer. It can be used locally: 2 browsers, and local daemon on one machine; or remotely: 1 local browser, and n remote audience browsers.

Client-side Moving Parts

Impresto enabled impress.js presentations are broken up into two types of views:

  • Audience: The viewer facing content
  • Narrator: The presentor

Within each impress.js slide, the addition of a notes class defined div section sets text to be displayed to the narrator only. This text, by default, is sized to be read able from a distance, not chaining you to your screen like some other presentation software, allowing you to roam while speaking.

Client-Server Interaction

At this time the client performs AJAX calls back to a server running the sample php code.

  • Client: Start Connection
Client Server
api.connect(serverURL,sessionID) Waiting for connection
// Initiate connection variables
  • Narrator: Update Slide
Client Server
api.startSync(true) ====> host:sample.php
AJAX Call to Server, wait for response command: update_slide; slideID: x Server cleanses strings, and sets slide time to time()
response <==== host:sample.php
result: 202; resultText: Accepted Return slide_update accepted
  • Audience: Get Slide
Client Server
api.startSync(false) ====> host:sample.php
AJAX Call to Server with current time command: get_slide; slideUpdateTime: unixtime Server cleanses strings, gets slide time from memcache, compares time, if time differs, returns update
response <==== host:sample.php
result: 200; slideID: y; slideUpdateTime: $lastUpdate Return JSON string
Change to slideID

Javascript Nuts & Bolts

The javascript API functions returned by the original impress() still work. We have added 3 additional methods allowing syncing between audience members and narrator. These 3 new functions added by impresto are:

  • connect: Connect to the Prestidigitation server
  • startSync: Start talking to the Prestidigitator (Show me some tricks)
  • stopSync: Stop talking to the Prestidigitator (His tricks are old now)

Javascript Functions

  • connect(str serverUrl,str sessionId): This method is used to setup the initial connection. At this time only AJAX calls are allowed. In the future Impresto will support AJAX and WebSockets with prestidigitator.
  • Variables:

    serverUrl: url pointing to the impresto php script sessionID: an unique identifier shared among all meeting attendants

    <script> api.connect(serverUrl, sessionId); </script>
  • startSync(boolean): This method is used to start transmitting sync requests and updates.
  • Variables: asNarrator: Pass true if the user is a narrator and push slide change to other users. Define false if the user is an audience and could read the slides only. Defaults to false.

    <script> api.startSync(as_narrator); </script>
  • stopSync(): This method is used to stop the transmission of sync requests and updates

    <script> api.stopSync(); </script>

DIY Demo Running

Sample php code requirements:

  • Memcached daemon or server
  • PECL-memcached

impresto.js's People

Contributors

rmackinnon avatar pessimistress avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.