Skip to content

Instantly share code, notes, and snippets.

@lakmeer
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lakmeer/3c329d193eeef8f4de3e to your computer and use it in GitHub Desktop.
Save lakmeer/3c329d193eeef8f4de3e to your computer and use it in GitHub Desktop.
la vidni zei irci

la vidni zei irci

Goal

The goal is to allow easy, instant video and audio chat to augment the existing community chat in the IRC chatroom. The experience should be organic, that is to say that the media chat feature should serve to enable spontaneous elevation of the existing conversation into an audiovisual layer of communication and back, seamlessly.

Subgoals

  • The client should run in-browser and require no program or plugin installs.
  • Connection should be secure and not leak user data.
  • Private communication must be possible in order to foster safe speech.
  • The user should not be required to register any kind of account before use.
  • All code GPL or similar, and published.

Base

The program is forked from the KiwiIRC web client for IRC. It has a pretty full IRC feature set, a nice interface and sensible code architecture, is actively developed and it is GPL. The new features will be build either by modifying the existing codebase, or, ideally, via the development of a plugin matching the spec set forth by Kiwi for plugins, however this might be too limiting for a properly integrated experience. In the interest of releasing a test version quickly, I will proceed by modifying the actual Kiwi client.

Features

Adding to the base Kiwi IRC client, we will associate a second layer of user grouping for each room. While the user can be in multiple rooms (standard IRC feature), each room also has an associated 'media room', in which a subset of the members of the associated IRC room are also media-chatting. The user, who is in multiple rooms, can choose to connect their outgoing media stream to any of the rooms which they are joined to. In this way, we also facilitate private chatting, by leveraging the existing ability within IRC and maintaining the concept that the media functions are a 'layer' which augments the existing IRC.

When the media-chat panel is open, the user's connection to the media-room can be in one of several states:

  • Disconnected: User sends and receives no data from anyone, regardless of whether there is a media-chat current happening. The meta section of the media-chat panel will describe the media-room, eg: how many are chatting now.
  • Spectating: User receives other's data only. This allows people who do not have camera or microphone hardware, or who are not confident enough with their lojban skills to benefit from immersion in live-spoken lojban and participate via the text chat.
  • Chatting: User receives other streams and transmits their own camera or microphone, or both. In this state, a representation of their own outgoing stream appears, including controls which allow to selectively block either their microphone or camera if necessary.

Incoming streams are displayed in the sidebar of a given room while the user is spectating or joined to the media-chat of that room. The user only be joined to one room at a time, or they would be listening to simultaneous unrelated conversations.

TODO

  • Add IRC-command interface to media layer as well as UI interface

    • Commands:
      /media join | connect [#room] (default this room)
      /media watch | spectate [#room]
      /media leave | stop | disconnect
      /media mute [self | @user] (where self is also alised by 'me' and 'mi')
      /media blank [self | @user]
      /media mute-all
      /media blank-all
      /media invite @user
    
  • Re-enable static resource caching

Roadmap

First Phase

  • Create modified Kiwi client suitable for hosting media features
  • Set up icecomm.io account and API key to bootstrap getting WebRTC working
  • Use icecomm.io client to implement media layer in Kiwi
  • Launch for test users in #lojban

Second Phase

  • If icecomm.io server support multiple rooms, implement room-segregated private chat.
  • Regardless, being to blackbox the icecomm.io server features using the client's web interface to replace it with a FOSS version of the server.
  • Replace icecomm.io client module with custom module
  • Extend the new server module to support multiple rooms
  • Implement private chat

Third Phase

  • Investigate pulling the media layer out into a Kiwi plugin and restore parity with main Kiwi codebase (prawnsalad/kiwiirc) as an external module.

Non-critical / Future Phases

  • Re-skin of Kiwi skin to match LMW
  • Lojban localisation of interface (easy, Kiwi is already properly localisable)
  • Add more user prefs using Kiwi 'settings' module
    • Audio-only avatar image
    • Auto-connect to media layer on channel join
    • Chat-partner-specific preferences, eg: volume levels for particular users
    • Bandwidth preferences, eg: do not allow spectators to consume my stream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment