Follow Me Slide Show
This post is about a new feature introduced in Collabora Online.
About the feature
The use case, for example, is a video meeting or a classroom with a teacher and students. The teacher starts a presentation, which gets auto-started for the students. The students' views update automatically as the teacher steps to the next slide. This is meant to work with any presentations that Impress can load, using the WebGL-based presentation output of Collabora Online.
Thanks to NLnet Foundation for sponsoring this work.
Working of the feature
This feature works similarly to other collaborative features in Collabora Online, broadcasting one user's actions to the rest of the people working on the same document to display real-time updates. When a follow-me slideshow starts, a normal slideshow begins for everyone on the document. In the background, we mimic every action (i.e., pressing the next/previous button, starting a video, or exiting) for each user by broadcasting the original action from the leader who initiated the slideshow.
Let's understand with an example of what happens when a teacher starts a shared presentation in class.
- The teacher (leader) presses the button "Start Follow Me Slide show"
- Online starts presentation and sends a message to every other user on the document "slideshowfollow newfollowmepresentation".
- Receiving this message now, all users start a presentation in a window and are marked as followers, ready to mimic more actions from the leader.
- The leader then clicks on the screen using the mouse or presses the next/previous button
- If the leader goes to the next step, the "slideshowfollow dispatcheffect" command is issued for all the users. This command will take everyone to the next effect or slide, whichever is relevant.
- Similarly, if the leader moved in the reverse direction, "slideshowfollow rewindeffect" is issued.
- The follower unfollows the presentation
- If at any point the follower wants to visit any part of the presentation, they can just start to navigate the presentation like a normal presentation, going back and forth.
- Followers have a special button in the presentation bar, using which they can refollow the leader. Pressing this button takes the follower to the exact point in the slideshow that the leader is presenting and then follows onwards.
- When a user has unfollowed the leader, in the background, Online is always noting on which slide and effect the leader is currently on to help the user refollow.
- Playing video
- When a slideshow has any video on it and the leader plays it "slideshowfollow followvideo" command is broadcast to start playing the video for everyone.
- Exiting presentation
- When the leader ends the presentation, it ends for all the users who are following the slides. For those users who are not following the presentation, nothing happens for them, and they can continue to navigate the slides as they like.
- Online starts presentation and sends a message to every other user on the document "slideshowfollow newfollowmepresentation".
- Receiving this message now, all users start a presentation in a window and are marked as followers, ready to mimic more actions from the leader.
- If the leader goes to the next step, the "slideshowfollow dispatcheffect" command is issued for all the users. This command will take everyone to the next effect or slide, whichever is relevant.
- Similarly, if the leader moved in the reverse direction, "slideshowfollow rewindeffect" is issued.
- If at any point the follower wants to visit any part of the presentation, they can just start to navigate the presentation like a normal presentation, going back and forth.
- Followers have a special button in the presentation bar, using which they can refollow the leader. Pressing this button takes the follower to the exact point in the slideshow that the leader is presenting and then follows onwards.
- When a user has unfollowed the leader, in the background, Online is always noting on which slide and effect the leader is currently on to help the user refollow.
- When a slideshow has any video on it and the leader plays it "slideshowfollow followvideo" command is broadcast to start playing the video for everyone.
- When the leader ends the presentation, it ends for all the users who are following the slides. For those users who are not following the presentation, nothing happens for them, and they can continue to navigate the slides as they like.
Performance
This feature came with its own challenges; one of the major concerns was that when a presentation had a lot of users, the server would have to render the slides for all the views altogether, which could overwhelm the server and degrade the performance.
Solution? Simple caching mechanism. Now we cache all the rendered slides, and if any user requests slides, we can serve them directly without forcing the server to render the slides again.
Demo:
Related PRs:
Comments
Post a Comment