Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Video Component #113

Draft
wants to merge 5 commits into
base: lab
Choose a base branch
from
Draft

New Video Component #113

wants to merge 5 commits into from

Conversation

carlossantos74
Copy link
Contributor

@carlossantos74 carlossantos74 commented Oct 28, 2024

!WIP

The goal is to develop a new video component specifically focused on video conferencing, while retaining all existing functionalities. This approach aims to enhance developer experience (DX) by providing a streamlined interface tailored to a single purpose.


To achieve this, I first restructured the previous video component as an abstract class, which now implements all the core functions required for a video component.

Next, I created two new components based on this abstract class:

  • VideoConference: retains the same properties and behaviors as the original component, including events, methods, and callbacks.
  • VideoMeeting: the newly proposed component, specifically for video conferencing.

Both components use the VideoComponent abstract class as their foundation.

Looking ahead, the idea is to keep the core functionalities within the abstract class while gradually moving component-specific logic to individual classes, making the code more modular and easier to maintain.


The suggested video meeting class parameters:

const room = await SuperVizRoom(DEVELOPER_KEY, {
  roomId: "ROOM_ID",
  group: {
    id: "GROUP_ID",
    name: "GROUP_NAME",
  },
  participant: {
    id: "USER_ID",
    name: "USER_NAME"
  },
})

video = new VideoMeeting({
  brand?: {
    logoUrl?: string
  }
  permissions: {
    allowGuests?: boolean
    toggleMic?: boolean
    toggleCamera?: boolean,
    toggleScreenShare?: boolean,
    toggleRecording?: boolean,
    toggleChat?: boolean,
    toggleParticipantList?: boolean
  },
  participantType?: ParticipantType | `${ParticipantType}`
  i18n?: {
    language?: string;
    locales?: Locale[];
  },
  styles?: string;
  callbacks?: {
    onToggleMicrophone?: () => void;
    onToggleCam?: () => void;
    onToggleRecording?: () => void;
    onToggleChat?: () => void;
    onToggleScreenShare?: () => void;
    onLeaveMeeting?: () => void;
    onClickSettings?: () => void;
  };
});

// methods
video.toggleMic()
video.toggleVirtualBackground()
video.toggleCamera()
video.toggleScreenShare()
video.toggleRecording()
video.toggleChat()

// add to room

@carlossantos74 carlossantos74 changed the title feat/video meeting New Video Component Oct 28, 2024
Copy link

YJS - Run #174

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
71 71 0 0 0 0 0 00:00:08

🎉 All tests passed!

Github Actions Test Reporter CTRF

Copy link

Realtime - Run #174

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
130 130 0 0 0 0 0 00:00:09

🎉 All tests passed!

Github Actions Test Reporter CTRF

Copy link

SDK - Run #174

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
748 748 0 0 0 0 0 00:00:22

🎉 All tests passed!

Github Actions Test Reporter CTRF

Copy link

github-actions bot commented Oct 28, 2024

LCOV Report - SDK Web Components Test Coverage Report ✅

All Files

  • Lines: 6230/6424 (97.0%) ✅ (Minimum coverage is 0%)
  • Functions: 304/319 (95.3%)
  • Branches: 610/693 (88.0%)

Changed Files

N/A

Copy link

Realtime - Run #177

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
130 130 0 0 0 0 0 00:00:10

🎉 All tests passed!

Github Actions Test Reporter CTRF

Copy link

YJS - Run #177

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
71 71 0 0 0 0 0 00:00:08

🎉 All tests passed!

Github Actions Test Reporter CTRF

Copy link

SDK - Run #177

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
746 746 0 0 0 0 0 00:00:23

🎉 All tests passed!

Github Actions Test Reporter CTRF

Copy link

YJS - Run #178

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
71 71 0 0 0 0 0 00:00:08

🎉 All tests passed!

Github Actions Test Reporter CTRF

Copy link

Realtime - Run #178

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
130 130 0 0 0 0 0 00:00:10

🎉 All tests passed!

Github Actions Test Reporter CTRF

Copy link

SDK - Run #178

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
757 757 0 0 0 0 0 00:00:23

🎉 All tests passed!

Github Actions Test Reporter CTRF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant