bigbluebutton / bigbluebutton-html-plugin-sdk

BigBlueButton Plugin SDK
GNU Lesser General Public License v3.0
7 stars 5 forks source link

Data channels #34

Closed TiagoJacobs closed 9 months ago

TiagoJacobs commented 11 months ago

We want to create a way that a plugin can send data to other participants of same meeting.

The data model on server side should be something like:

dataChannel[meetingId][pluginName][channelName] = [] // array of messages

Things to discuss:

Proposed API:

// dispatch a message that can be read by any user

const [data, dispatch] = pluginApi.useDataChannel("star-rating");

useEffect( () => {
    dispatch(
        {
            "type": "new-star",
            "userId": "abc123"
        }
    );
}, []);
// dispatch a message that can be read by presenter or a specific user
const [data, dispatch] = pluginApi.useDataChannel("another-channel");

useEffect( () => {
    dispatch(
        {
            "type": "test",
            "content": "bla"
        },
        [{role: Roles.PRESENTER}, {userId:"123"} ]
    );
}, []);