Skip to content

Instantly share code, notes, and snippets.

@lfzawacki
Last active December 26, 2015 22:19
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 lfzawacki/7222656 to your computer and use it in GitHub Desktop.
Save lfzawacki/7222656 to your computer and use it in GitHub Desktop.
BBB Html5 bridges

BBB Bridges / REDIS / HTML5

From https://github.com/bigbluebutton/bigbluebutton/tree/html5-bridge In bigbluebutton / bigbluebutton-apps / src / main / java / org / bigbluebutton / conference / service / Service Classes call methods from the bridge methods and write date to a redis instance

ChatService -> ChatBridge

Service Bridges

Chat

chat - https://github.com/bigbluebutton/bigbluebutton/blob/html5-bridge/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/chat/ChatBridge.java

storeMsg

Creates a new key (hmset)

'meeting-meetingID-message-messageID': 
{

    'message' : 'message',
    'username' : 'username',
    'userID' : userID
}

Appends message id (rpush)

'meeting-meetingID-messages':
[
    messageID1, messageID2, ...
]

Participants

participants - https://github.com/bigbluebutton/bigbluebutton/blob/html5-bridge/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/participants/ParticipantsBridge.java

storeParticipants

Using sadd

'meeting-meetingID-users' : { userID }

Using hmset

  'meeting-meetingID-user-userID' :
  {
    'username' : 'username',
    'meetingID' : meetingID,
    'refreshing' : true/false,
    'dupSess' : true/false,
    'sockets' : 0,
    'pubID' : publicID
  }

removeParticipant

Using srem, removes:

'meeting-meetingID-users' : { userID }

Using del, removes:

'meeting-meetingID-user-userID'

sendParticipantJoin

Writes on channel BIGBLUEBUTTON_BRIDGE

{ [meetingID, 'user join', userID, 'username', 'role'] }

sendParticipantLeave

Writes on channel BIGBLUEBUTTON_BRIDGE

{ [meetingID, 'user leave', userID] }

storeAssignPresenter

Using hset, 'meeting-meetingID-user-userID-status' : { "presenter", true/false }

Using hmset,

'meeting-meetingID-presenter' :
{
   'sessionID' : 0,
   'publicID' : userID
}                

sendAssignPresenter

Writes on channel BIGBLUEBUTTON_BRIDGE

{ [ meetingID, 'setPresenter', userID ]  }

Presentation

presentation - https://github.com/bigbluebutton/bigbluebutton/blob/html5-bridge/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/presentation/PresentationBridge.java

sendCursorUpdate

Writes on channel BIGBLUEBUTTON_BRIDGE

{ [ meetingID, 'mvcur', xPercent, yPercent ]  }

changeSlide

Writes on channel BIGBLUEBUTTON_BRIDGE

{ [ meetingID, 'changeslide', 'presentation_url' ]  }

{ [ meetingID, 'clrPaper', ] }

Queries all Shapes from the current slide using lrange and 'meeting-meetingID-presentation-presentationName-page-slideNumber-currentshapes-shapeID':

{ [meetingID, "all_shapes", "shapes" : [ ... ] ] }

resizeAndMoveSlide

On channel BIGBLUEBUTTON_BRIDGE

{ [meetingID, "move_and_zoom", xOffset, yOffset, widthRatio, heightRatio] }

Whiteboard

whiteboard - https://github.com/bigbluebutton/bigbluebutton/blob/html5-bridge/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/whiteboard/WhiteboardBridge.java

undo

Writes on channel BIGBLUEBUTTON_BRIDGE

{ [ meetingID, 'undo' ]  }

clear

Writes on channel BIGBLUEBUTTON_BRIDGE

{ [ meetingID, 'clrPaper' ]  }

sendAnnotation

TBD

storeAnnotation

TBD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment