ginger’s thoughts

http://blog.gingertech.net/

Les articles publiés sur le site

  • Use deck.js as a remote presentation tool

    8 janvier 2014, par silvia

    deck.js is one of the new HTML5-based presentation tools. It’s simple to use, in particular for your basic, every-day presentation needs. You can also create more complex slides with animations etc. if you know your HTML and CSS.

    Yesterday at linux.conf.au (LCA), I gave a presentation using deck.js. But I didn’t give it from the lectern in the room in Perth where LCA is being held – instead I gave it from the comfort of my home office at the other end of the country.

    I used my laptop with in-built webcam and my Chrome browser to give this presentation. Beforehand, I had uploaded the presentation to a Web server and shared the link with the organiser of my speaker track, who was on site in Perth and had set up his laptop in the same fashion as myself. His screen was projecting the Chrome tab in which my slides were loaded and he had hooked up the audio output of his laptop to the room speaker system. His camera was pointed at the audience so I could see their reaction.

    I loaded a slide master URL:
    http://html5videoguide.net/presentations/lca_2014_webrtc/?master
    and the room loaded the URL without query string:
    http://html5videoguide.net/presentations/lca_2014_webrtc/.

    Then I gave my talk exactly as I would if I was in the same room. Yes, it felt exactly as though I was there, including nervousness and audience feedback.

    How did we do that? WebRTC (Web Real-time Communication) to the rescue, of course!

    We used one of the modules of the rtc.io project called rtc-glue to add the video conferencing functionality and the slide navigation to deck.js. It was actually really really simple!

    Here are the few things we added to deck.js to make it work:

    • Code added to index.html to make the video connection work:
      <meta name="rtc-signalhost" content="http://rtc.io/switchboard/">
      <meta name="rtc-room" content="lca2014">
      ...
      <video id="localV" rtc-capture="camera" muted></video>
      <video id="peerV" rtc-peer rtc-stream="localV"></video>
      ...
      <script src="glue.js"></script>
      <script>
      glue.config.iceServers = [{ url: 'stun:stun.l.google.com:19302' }];
      </script>
      

      The iceServers config is required to punch through firewalls – you may also need a TURN server. Note that you need a signalling server – in our case we used http://rtc.io/switchboard/, which runs the code from rtc-switchboard.

    • Added glue.js library to deck.js:

      Downloaded from https://raw.github.com/rtc-io/rtc-glue/master/dist/glue.js into the source directory of deck.js.

    • Code added to index.html to synchronize slide navigation:
      glue.events.once('connected', function(signaller) {
        if (location.search.slice(1) !== '') {
          $(document).bind('deck.change', function(evt, from, to) {
            signaller.send('/slide', {
              idx: to,
              sender: signaller.id
            });
          });
        }
        signaller.on('slide', function(data) {
          console.log('received notification to change to slide: ', data.idx);
          $.deck('go', data.idx);
        });
      });
      

      This simply registers a callback on the slide master end to send a slide position message to the room end, and a callback on the room end that initiates the slide navigation.

    And that’s it!

    You can find my slide deck on GitHub.

    Feel free to write your own slides in this manner – I would love to have more users of this approach. It should also be fairly simple to extend this to share pointer positions, so you can actually use the mouse pointer to point to things on your slides remotely. Would love to hear your experiences!

    Note that the slides are actually a talk about the rtc.io project, so if you want to find out more about these modules and what other things you can do, read the slide deck or watch the talk when it has been published by LCA.

    Many thanks to Damon Oehlman for his help in getting this working.

    BTW: somebody should really fix that print style sheet for deck.js – I’m only ever getting the one slide that is currently showing. ;-)

  • Use deck.js as a remote presentation tool

    8 janvier 2014, par silvia

    deck.js is one of the new HTML5-based presentation tools. It’s simple to use, in particular for your basic, every-day presentation needs. You can also create more complex slides with animations etc. if you know your HTML and CSS.

    Yesterday at linux.conf.au (LCA), I gave a presentation using deck.js. But I didn’t give it from the lectern in the room in Perth where LCA is being held – instead I gave it from the comfort of my home office at the other end of the country.

    I used my laptop with in-built webcam and my Chrome browser to give this presentation. Beforehand, I had uploaded the presentation to a Web server and shared the link with the organiser of my speaker track, who was on site in Perth and had set up his laptop in the same fashion as myself. His screen was projecting the Chrome tab in which my slides were loaded and he had hooked up the audio output of his laptop to the room speaker system. His camera was pointed at the audience so I could see their reaction.

    I loaded a slide master URL:
    http://html5videoguide.net/presentations/lca_2014_webrtc/?master
    and the room loaded the URL without query string:
    http://html5videoguide.net/presentations/lca_2014_webrtc/.

    Then I gave my talk exactly as I would if I was in the same room. Yes, it felt exactly as though I was there, including nervousness and audience feedback.

    How did we do that? WebRTC (Web Real-time Communication) to the rescue, of course!

    We used one of the modules of the rtc.io project called rtc-glue to add the video conferencing functionality and the slide navigation to deck.js. It was actually really really simple!

    Here are the few things we added to deck.js to make it work:

    • Code added to index.html to make the video connection work:
      <meta name="rtc-signalhost" content="http://rtc.io/switchboard/">
      <meta name="rtc-room" content="lca2014">
      ...
      <video id="localV" rtc-capture="camera" muted></video>
      <video id="peerV" rtc-peer rtc-stream="localV"></video>
      ...
      <script src="glue.js"></script>
      <script>
      glue.config.iceServers = [{ url: 'stun:stun.l.google.com:19302' }];
      </script>
      

      The iceServers config is required to punch through firewalls – you may also need a TURN server. Note that you need a signalling server – in our case we used http://rtc.io/switchboard/, which runs the code from rtc-switchboard.

    • Added glue.js library to deck.js:

      Downloaded from https://raw.github.com/rtc-io/rtc-glue/master/dist/glue.js into the source directory of deck.js.

    • Code added to index.html to synchronize slide navigation:
      glue.events.once('connected', function(signaller) {
        if (location.search.slice(1) !== '') {
          $(document).bind('deck.change', function(evt, from, to) {
            signaller.send('/slide', {
              idx: to,
              sender: signaller.id
            });
          });
        }
        signaller.on('slide', function(data) {
          console.log('received notification to change to slide: ', data.idx);
          $.deck('go', data.idx);
        });
      });
      

      This simply registers a callback on the slide master end to send a slide position message to the room end, and a callback on the room end that initiates the slide navigation.

    And that’s it!

    You can find my slide deck on GitHub.

    Feel free to write your own slides in this manner – I would love to have more users of this approach. It should also be fairly simple to extend this to share pointer positions, so you can actually use the mouse pointer to point to things on your slides remotely. Would love to hear your experiences!

    Note that the slides are actually a talk about the rtc.io project, so if you want to find out more about these modules and what other things you can do, read the slide deck or watch the talk when it has been published by LCA.

    Many thanks to Damon Oehlman for his help in getting this working.

    BTW: somebody should really fix that print style sheet for deck.js – I’m only ever getting the one slide that is currently showing.

  • Use deck.js as a remote presentation tool

    8 janvier 2014, par silvia

    deck.js is one of the new HTML5-based presentation tools. It’s simple to use, in particular for your basic, every-day presentation needs. You can also create more complex slides with animations etc. if you know your HTML and CSS.

    Yesterday at linux.conf.au (LCA), I gave a presentation using deck.js. But I didn’t give it from the lectern in the room in Perth where LCA is being held – instead I gave it from the comfort of my home office at the other end of the country.

    I used my laptop with in-built webcam and my Chrome browser to give this presentation. Beforehand, I had uploaded the presentation to a Web server and shared the link with the organiser of my speaker track, who was on site in Perth and had set up his laptop in the same fashion as myself. His screen was projecting the Chrome tab in which my slides were loaded and he had hooked up the audio output of his laptop to the room speaker system. His camera was pointed at the audience so I could see their reaction.

    I loaded a slide master URL:
    http://html5videoguide.net/presentations/lca_2014_webrtc/?master
    and the room loaded the URL without query string:
    http://html5videoguide.net/presentations/lca_2014_webrtc/.

    Then I gave my talk exactly as I would if I was in the same room. Yes, it felt exactly as though I was there, including nervousness and audience feedback.

    How did we do that? WebRTC (Web Real-time Communication) to the rescue, of course!

    We used one of the modules of the rtc.io project called rtc-glue to add the video conferencing functionality and the slide navigation to deck.js. It was actually really really simple!

    Here are the few things we added to deck.js to make it work:

    • Code added to index.html to make the video connection work:
      <meta name="rtc-signalhost" content="http://rtc.io/switchboard/">
      <meta name="rtc-room" content="lca2014">
      ...
      <video id="localV" rtc-capture="camera" muted></video>
      <video id="peerV" rtc-peer rtc-stream="localV"></video>
      ...
      <script src="glue.js"></script>
      <script>
      glue.config.iceServers = [{ url: 'stun:stun.l.google.com:19302' }];
      </script>
      

      The iceServers config is required to punch through firewalls – you may also need a TURN server. Note that you need a signalling server – in our case we used http://rtc.io/switchboard/, which runs the code from rtc-switchboard.

    • Added glue.js library to deck.js:

      Downloaded from https://raw.github.com/rtc-io/rtc-glue/master/dist/glue.js into the source directory of deck.js.

    • Code added to index.html to synchronize slide navigation:
      glue.events.once('connected', function(signaller) {
        if (location.search.slice(1) !== '') {
          $(document).bind('deck.change', function(evt, from, to) {
            signaller.send('/slide', {
              idx: to,
              sender: signaller.id
            });
          });
        }
        signaller.on('slide', function(data) {
          console.log('received notification to change to slide: ', data.idx);
          $.deck('go', data.idx);
        });
      });
      

      This simply registers a callback on the slide master end to send a slide position message to the room end, and a callback on the room end that initiates the slide navigation.

    And that’s it!

    You can find my slide deck on GitHub.

    Feel free to write your own slides in this manner – I would love to have more users of this approach. It should also be fairly simple to extend this to share pointer positions, so you can actually use the mouse pointer to point to things on your slides remotely. Would love to hear your experiences!

    Note that the slides are actually a talk about the rtc.io project, so if you want to find out more about these modules and what other things you can do, read the slide deck or watch the talk when it has been published by LCA.

    Many thanks to Damon Oehlman for his help in getting this working.

    BTW: somebody should really fix that print style sheet for deck.js – I’m only ever getting the one slide that is currently showing.

  • New Challenges

    1er janvier 2014, par silvia

    I finished up at Google last week and am now working at NICTA, an Australian ICT research institute.

    My work with Google was exciting and I learned a lot. I like to think that Google also got a lot out of me – I coded and contributed to some YouTube caption features, I worked on Chrome captions and video controls, and above all I worked on video accessibility for HTML at the W3C.

    I was one of the key authors of the W3C Media Accessibility Requirements document that we created in the Media Accessibility Task Force of the W3C HTML WG. I then went on to help make video accessibility a reality. We created WebVTT and the <track> element and applied it to captions, subtitles, chapters (navigation), video descriptions, and metadata. To satisfy the need for synchronisation of video with other media resources such as sign language video or audio descriptions, we got the MediaController object and the @mediagroup attribute.

    I must say it was a most rewarding time. I learned a lot about being productive at Google, collaborate successfully over the distance, about how the WebKit community works, and about the new way of writing W3C standard (which is more like pseudo-code). As one consequence, I am now a co-editor of the W3C HTML spec and it seems I am also about to become the editor of the WebVTT spec.

    At NICTA my new focus of work is WebRTC. There is both a bit of research and a whole bunch of application development involved. I may even get to do some WebKit development, if we identify any issues with the current implementation. I started a week ago and am already amazed by the amount of work going on in the WebRTC space and the amazing number of open source projects playing around with it. Video conferencing is a new challenge and I look forward to it.

  • Video Conferencing in HTML5 : WebRTC via Socket.io

    1er janvier 2014, par silvia

    Six months ago I experimented with Web sockets for WebRTC and the early implementations of PeerConnection in Chrome. Last week I gave a presentation about WebRTC at Linux.conf.au, so it was time to update that codebase.

    I decided to use socket.io for the signalling following the idea of Luc, which made the server code even smaller and reduced it to a mere reflector:

     var app = require('http').createServer().listen(1337);
     var io = require('socket.io').listen(app);
    
     io.sockets.on('connection', function(socket) {
             socket.on('message', function(message) {
             socket.broadcast.emit('message', message);
         });
     });

    Then I turned to the client code. I was surprised to see the massive changes that PeerConnection has gone through. Check out my slide deck to see the different components that are now necessary to create a PeerConnection.

    I was particularly surprised to see the SDP object now fully exposed to JavaScript and thus the ability to manipulate it directly rather than through some API. This allows Web developers to manipulate the type of session that they are asking the browsers to set up. I can imaging e.g. if they have support for a video codec in JavaScript that the browser does not provide built-in, they can add that codec to the set of choices to be offered to the peer. While it is flexible, I am concerned if this might create more problems than it solves. I guess we’ll have to wait and see.

    I was also surprised by the need to use ICE, even though in my experiment I got away with an empty list of ICE servers – the ICE messages just got exchanged through the socket.io server. I am not sure whether this is a bug, but I was very happy about it because it meant I could run the whole demo on a completely separate network from the Internet.

    The most exciting news since my talk is that Mozilla and Google have managed to get a PeerConnection working between Firefox and Chrome – this is the first cross-browser video conference call without a plugin! The code differences are minor.

    Since the specification of the WebRTC API and of the MediaStream API are now official Working Drafts at the W3C, I expect other browsers will follow. I am also looking forward to the possibilities of:

    The best places to learn about the latest possibilities of WebRTC are webrtc.org and the W3C WebRTC WG. code.google.com has open source code that continues to be updated to the latest released and interoperable features in browsers.

    The video of my talk is in the process of being published. There is a MP4 version on the Linux Australia mirror server, but I expect it will be published properly soon. I will update the blog post when that happens.

    http://mirror.linux.org.au/linux.conf.au/2013/mp4/Code_up_your_own_video_conference_in_HTML5.mp4