I wanted to use the full WebRTC fanciness for the presentation (data for sync, plus video and audio), but the associated risk was a little too high, so I didnāt try it. (Iām behind NAT, so Iām not sure if it would have worked given the current lack of TURN support in WebRTC implementationsāāit would depend on the network configuration at the other end.) We ended up going with the boring lowātech approach of using Skype for the audio and video.
(I have a laptop without a camera; I borrowed a laptop with a camera for the presentation, but logged in as a guest on that machine I was unable to install the proper video conferencing software that Mozilla use; hence Skype.)
The format: SVG
First of all, the basic technology: I tried various HTML5 slide deck things (most notably, deck.js, reveal.js, impress.js and the Google I/O 2012 slides template) but wasnāt really happy with any of them; I could have worked with what was there, extending them with CSS and so forth, but I didnāt have a great deal of time, so I decided to go with an unconventional tool that Iām already familiar with, Inkscape paired with JessyInk (an extension bundled with Inkscape).
The end result is an SVG presentation in which I get as complete control of the drawing area as one would with PowerPoint and which runs nice and smoothly in decent browsers. By choice, I didnāt use any advanced features of JessyInk (no zooming Ć la Prezi, no transitions, no effects).
Fonts
I normally use Ubuntu and Ubuntu Mono and I also wanted a nice serifāāI settled on Cardo (regularly a favourite of mine).
Of course, as Iām deploying the presentation on other peopleās machines, the fonts need to be embedded in some way. (Or else convert all the text to paths, which isnāt good for accessibility or file size.)
Fortunately, thereās no need to mess about with SVG fonts; you can use the same technology as you would in HTML, web fonts; but you just canāt use a <link>
element (itās not valid SVG); youāll need to use a different technique. I went for the quickāandāeasy approach of using @import
inside a <style>
element. Just be careful to escape any ampersands as &
.
You can do this from inside Inkscape with the XML editor, or you can just pull out your favourite text editor and add it into a <defs>
element.
I believe that writing <?xml-stylesheet href="https://..." type="text/css"?>
would also work, but it wasnāt the first thing that occurred to me.
Remote control
At first I wanted (as a loyal Mozilla fanāāand also because itās pretty cool) to use TogetherJS, but itās been designed for working in HTML, and I didnāt have time to adapt it to SVG (at the least, itād need changing away from using document.head
as the place to inject scripts and also for any HTML stuff to be done as foreign objects), so I decided to just write the stuff myself. I didnāt want the bother of setting up a WebSocket server myself (it takes time that I really didnāt have spare, and rust-http certainly isnāt in any state to do WebSocket), so I went with a hosted solution, PubNub.
The simplest place to hook communications in was the keyboard event handlers, so I assessed JessyInkās and replaced them with things that just publish a message to all subscribers and have the reception method perform the actual local change. This worked a treat. (I reckoned itād take 20 minutes, so I allocated myself an hour, 3Ć generally being a decent estimation inflation coefficient. It took 20 minutes to be all working, though I probably spent another ten minutes playing with it.)
No, this is not at all perfect; if someone comes in after the start, or if you click (I could have disabled thisāāitās a firstāclass feature to do soāābut didnāt bother) or use slide inventory mode and move the mouse to a different slide, theyāll be out of sync; the Home or End keys can fix this up. Controlling the actual location would be a much more solid approach.
I also observed that the slide inventory mode, supposedly activated by the i key, now required pressing that key twice to activate or deactivate; I didnāt investigate why this is at all.
I didnāt hook up the mouse, so even if Iād wanted to I couldnāt have used JessyInkās fancy live drawing tools.
I had cause to try it briefly on a Mac in Safari; it didnāt work well. Iām not sure whose fault that is. But it worked fine on Firefox, which is all I needed.
This is the actual code contained in the SVG:
Yes, thatās all that was needed to make my slides sync a quarter of the way round the world. (Approximately 92.47Ā° of longitude.) Note that I made it so that you had to add ?sync
onto the end of the URL to activate syncing, so that I could be lazy and publish exactly what I had used, without needing to change it.