Media Area: let plugins use the "Stop sharing" footer button

Open
#306 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
react, typescript

Research direction

Start from the Media Area option definition and the modal footer that computes isSharing; trace how stopExternalVideoShare and screenshareHasEnded are wired, and how GenericContentMainArea plugins register content. The open design question is whether multiple shared contents get one footer button each or only the topmost one is stopped. Done means an allowed option with onStopSharing shows the footer button, calls the callback, optionally uses stopSharingIcon, and has tests covering the plugin path.

Written by the indexing model from the issue text.

Description

When screen share, an external video or camera as content is shared, the Media Area modal shows a red Stop sharing button in its footer. It is the standard place to stop whatever is in the presentation area. Today it only knows about the built-in contents:

const isSharing = isSharingVideo || hasCameraAsContent || isScreenGloballyBroadcasting;
...
{currentView === 'main' && isSharing && (
  <Styled.FooterContainer>
    <BBButton dataTest="StopSharing" color="danger" ... onClick={() => stopSharingAction?.()} />

A plugin that shares content into the presentation area (GenericContentMainArea) has to add its own "stop" option or modal button. The presenter then gets two different ways to stop sharing, depending on who provides the content.

Proposal

Let a Media Area option declare that it is sharing and how to stop it:

new MediaAreaOption({
  label: 'Website',
  ...
  active: true,
  onStopSharing: () => { /* remove the plugin content */ },
});

When an allowed option has onStopSharing, the core shows the footer button and calls it, the same way it calls stopExternalVideoShare / screenshareHasEnded. It could also use an optional stopSharingIcon. If more than one content is shared, the core could stop the one on top of the presentation area, or show one button for each.

Dominant language
No language data
Stars
17
Forks
18
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bigbluebutton/bigbluebutton-html-plugin-sdk

All issues in bigbluebutton/bigbluebutton-html-plugin-sdk

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.