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

sampling webcam data pubsub methods added #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "videosdk-rtc-react-prebuilt-ui",
"version": "0.3.23",
"private": true,
"homepage": "https://embed.videosdk.live/rtc-js-prebuilt/0.3.23/",
"homepage": "https://embed.videosdk.live/rtc-js-prebuilt/0.3.34/",
"dependencies": {
"@material-ui/core": "^4.11.4",
"@material-ui/icons": "^4.11.2",
Expand Down Expand Up @@ -58,4 +58,4 @@
"last 1 safari version"
]
}
}
}
36 changes: 18 additions & 18 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,10 @@ const App = () => {
return isLGDesktop
? maxParticipantGridCount_large_desktop
: isSMDesktop
? maxParticipantGridCount_desktop
: isTab
? maxParticipantGridCount_tab
: maxParticipantGridCount_mobile;
? maxParticipantGridCount_desktop
: isTab
? maxParticipantGridCount_tab
: maxParticipantGridCount_mobile;
}, [isLGDesktop, isSMDesktop, isTab]);

const paramKeys = useMemo(() => getParams({ maxGridSize }), [maxGridSize]);
Expand All @@ -455,21 +455,21 @@ const App = () => {
const [joinScreenWebCam, setJoinScreenWebCam] = useState(
paramKeys.joinScreenEnabled === "true"
? paramKeys.participantCanToggleSelfWebcam === "true" &&
paramKeys.webcamEnabled === "true"
paramKeys.webcamEnabled === "true"
: paramKeys.webcamEnabled === "true"
);

const [joinScreenMic, setJoinScreenMic] = useState(
paramKeys.joinScreenEnabled === "true"
? paramKeys.participantCanToggleSelfMic === "true" &&
paramKeys.micEnabled === "true"
paramKeys.micEnabled === "true"
: paramKeys.micEnabled === "true"
);
const [selectedMic, setSelectedMic] = useState({ id: null });
const [selectedWebcam, setSelectedWebcam] = useState({ id: null });

const validateMeetingId = async ({ meetingId, token, debug, region }) => {
const BASE_URL = "https://api.videosdk.live";
const BASE_URL = "https://dev-api.videosdk.live";

const urlMeetingId = `${BASE_URL}/v1/prebuilt/meetings/${meetingId}`;

Expand Down Expand Up @@ -546,8 +546,8 @@ const App = () => {
paramKeys.theme === appThemes.DARK
? theme.palette.darkTheme.main
: paramKeys.theme === appThemes.LIGHT
? theme.palette.lightTheme.main
: theme.palette.background.default
? theme.palette.lightTheme.main
: theme.palette.background.default
}
color={
paramKeys.theme === appThemes.LIGHT
Expand Down Expand Up @@ -575,8 +575,8 @@ const App = () => {
paramKeys.theme === appThemes.DARK
? theme.palette.darkTheme.main
: paramKeys.theme === appThemes.LIGHT
? theme.palette.lightTheme.main
: theme.palette.background.default,
? theme.palette.lightTheme.main
: theme.palette.background.default,
}}
>
<CircularProgress size={"4rem"} />
Expand Down Expand Up @@ -705,13 +705,13 @@ const App = () => {
micEnabled: joinScreenMic,
webcamEnabled: joinScreenWebCam,
name: name,
maxResolution:
paramKeys.isRecorder === "true"
? "hd"
: paramKeys.maxResolution === "sd" ||
paramKeys.maxResolution === "hd"
? paramKeys.maxResolution
: "sd",
maxResolution: "hd",
// paramKeys.isRecorder === "true"
// ? "hd"
// : paramKeys.maxResolution === "sd" ||
// paramKeys.maxResolution === "hd"
// ? paramKeys.maxResolution
// : "sd",
participantId: paramKeys.participantId,
preferredProtocol: paramKeys.preferredProtocol,
autoConsume: false,
Expand Down
23 changes: 15 additions & 8 deletions src/MeetingAppContextDef.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ export const MeetingAppProvider = ({
// isActive: false,
// },
]);
const [s_layer, set_s_layer] = useState()
const [t_layer, set_t_layer] = useState()


const [createdPolls, setCreatedPolls] = useState([]);
const [endedPolls, setEndedPolls] = useState([]);
Expand Down Expand Up @@ -224,13 +227,13 @@ export const MeetingAppProvider = ({
? appMeetingLayout.type === meetingLayouts.SPOTLIGHT
? meetingLayouts.SPOTLIGHT
: appMeetingLayout.type === meetingLayouts.SIDEBAR
? meetingLayouts.SIDEBAR
: meetingLayouts.GRID
? meetingLayouts.SIDEBAR
: meetingLayouts.GRID
: appMeetingLayout.type === meetingLayouts.SPOTLIGHT
? meetingLayouts.UNPINNED_SPOTLIGHT
: appMeetingLayout.type === meetingLayouts.SIDEBAR
? meetingLayouts.UNPINNED_SIDEBAR
: meetingLayouts.GRID;
? meetingLayouts.UNPINNED_SPOTLIGHT
: appMeetingLayout.type === meetingLayouts.SIDEBAR
? meetingLayouts.UNPINNED_SIDEBAR
: meetingLayouts.GRID;
}, [appMeetingLayout, meetingLayouts]);

const videoProcessor = new VirtualBackgroundProcessor();
Expand Down Expand Up @@ -369,6 +372,10 @@ export const MeetingAppProvider = ({
setSelectWebcamDeviceId,

videoProcessor,


s_layer, set_s_layer,
t_layer, set_t_layer
}}
>
<SnackbarProvider
Expand All @@ -379,8 +386,8 @@ export const MeetingAppProvider = ({
appTheme === appThemes.DARK
? theme.palette.darkTheme.seven
: appTheme === appThemes.LIGHT
? theme.palette.lightTheme.main
: "",
? theme.palette.lightTheme.main
: "",
color:
appTheme === appThemes.LIGHT &&
theme.palette.lightTheme.contrastText,
Expand Down
Loading