Skip to content

feat(Meeting): add Meeting component#448

Merged
ArgoZhang merged 4 commits intomasterfrom
feat-meeting
May 25, 2025
Merged

feat(Meeting): add Meeting component#448
ArgoZhang merged 4 commits intomasterfrom
feat-meeting

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented May 25, 2025

Link issues

fixes #447

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Add a new BootstrapBlazor.JitsiMeet extension project containing a Meet component with customizable options, JS module for Jitsi external API integration, and project setup in the solution

New Features:

  • Add Jitsi Meet component (Meet) to embed video meetings via Jitsi
  • Introduce MeetOption and UserInfo classes for meeting configuration

Enhancements:

  • Bundle Jitsi External API script under wwwroot and wire up JS interop for init, dispose and command execution

Build:

  • Include new BootstrapBlazor.JitsiMeet project in solution and add its csproj

@bb-auto bb-auto Bot added the enhancement New feature or request label May 25, 2025
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 25, 2025

Reviewer's Guide

This PR adds a new BootstrapBlazor.JitsiMeet library and a Meet component that wraps the Jitsi Meet External API for Blazor: it introduces configuration classes, a Razor component with code-behind to initialize and control Jitsi sessions, a JS module for loading and disposing the external_api.js script, and bundles the Jitsi API into wwwroot.

Sequence Diagram for Jitsi Meet Component Initialization

sequenceDiagram
    actor User
    participant MeetRazor as "Meet.razor (UI)"
    participant MeetCS as "Meet.razor.cs (Logic)"
    participant MeetJS as "Meet.razor.js (JS Interop)"
    participant JitsiLib as "JitsiMeetExternalAPI Lib"

    User->>MeetRazor: Navigates to page with Meet component
    MeetRazor->>MeetCS: Component Initialization / InvokeInitAsync()
    MeetCS->>MeetJS: init(id, interop, domain, options)
    MeetJS->>MeetJS: addScript('./_content/BootstrapBlazor.JitsiMeet/external_api.js')
    MeetJS->>MeetJS: Set options.parentNode
    MeetJS->>MeetJS: Set options.onload = () => interop.invokeMethodAsync('OnLoadCallBack')
    MeetJS->>JitsiLib: new JitsiMeetExternalAPI(domain, options)
    activate JitsiLib
    Note right of JitsiLib: Jitsi IFrame loads meeting
    JitsiLib-->>MeetJS: (Jitsi loaded) Executes options.onload()
    deactivate JitsiLib
    MeetJS->>MeetCS: interop.invokeMethodAsync('OnLoadCallBack')
    MeetCS->>MeetCS: OnLoadCallBack() executed
    MeetCS->>MeetCS: User's OnLoad?.Invoke() callback executed
Loading

Sequence Diagram for Jitsi Meet Command Execution

sequenceDiagram
    actor User
    participant BlazorAppPage as "Blazor App Page/Component"
    participant MeetCS as "Meet.razor.cs (Logic)"
    participant MeetJS as "Meet.razor.js (JS Interop)"
    participant JitsiAPIInstance as "JitsiMeetExternalAPI Instance"

    User->>BlazorAppPage: Triggers an action (e.g., clicks a custom UI button)
    BlazorAppPage->>MeetCS: ExecuteCommand("jitsiCommand", {param: "value"})
    MeetCS->>MeetJS: executeCommand(id, "jitsiCommand", {param: "value"})
    MeetJS->>JitsiAPIInstance: api.executeCommand("jitsiCommand", {param: "value"})
    Note right of JitsiAPIInstance: Command executed in Jitsi IFrame
Loading

Class Diagram for Jitsi Meet Integration Components

classDiagram
    class MeetOption {
        +string RoomName
        +object Width
        +object Height
        +object ConfigOverwrite
        +object InterfaceConfigOverwrite
        +string Jwt
        +object Invitees
        +object Devices
        +UserInfo UserInfo
        +string Lang
    }
    class UserInfo {
        +string Email
        +string DisplayName
    }
    class Meet {
        +string Domain
        +MeetOption Option
        +Action OnLoad
        +InvokeInitAsync() Task
        +ExecuteCommand(string command, object? args) Task
        +OnLoadCallBack() void
    }
    MeetOption "1" --o "1" UserInfo : has a
    Meet "1" -- "1" MeetOption : uses
Loading

File-Level Changes

Change Details Files
Introduce a new Jitsi Meet integration project and register it in the solution
  • Update the solution file to include BootstrapBlazor.JitsiMeet
  • Add BootstrapBlazor.JitsiMeet.csproj under src/components
BootstrapBlazor.Extensions.sln
src/components/BootstrapBlazor.JitsiMeet/BootstrapBlazor.JitsiMeet.csproj
Add configuration classes to encapsulate meeting settings
  • Define MeetOption with room name, size, overwrite configs, JWT, invitees, devices, user info, language
  • Define UserInfo with Email and DisplayName
src/components/BootstrapBlazor.JitsiMeet/MeetOption.cs
Implement Meet component for Blazor
  • Declare Domain, Option and OnLoad parameters
  • Override InvokeInitAsync to call JS init method
  • Implement ExecuteCommand and JSInvokable OnLoadCallBack
src/components/BootstrapBlazor.JitsiMeet/Meet.razor.cs
src/components/BootstrapBlazor.JitsiMeet/Meet.razor
Provide a JavaScript interop module for Jitsi
  • Load external_api.js and instantiate JitsiMeetExternalAPI
  • Store instance data and handle dispose
  • Expose executeCommand via JS invoke
src/components/BootstrapBlazor.JitsiMeet/Meet.razor.js
Bundle the Jitsi Meet External API into component’s assets
  • Add minified external_api.js into wwwroot
  • Enable script reference for interop module
src/components/BootstrapBlazor.JitsiMeet/wwwroot/external_api.js

Assessment against linked issues

Issue Objective Addressed Explanation
#447 Create a reusable Blazor component for embedding Jitsi Meet sessions.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@bb-auto bb-auto Bot added this to the v9.2.0 milestone May 25, 2025
@ArgoZhang ArgoZhang merged commit 27ac0d9 into master May 25, 2025
1 check passed
@ArgoZhang ArgoZhang deleted the feat-meeting branch May 25, 2025 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(Meeting): add Meeting component

2 participants