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

[Release] 7차 배포 (12.06) #388

Merged
merged 3 commits into from
Dec 6, 2024
Merged
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
9 changes: 0 additions & 9 deletions apps/media/src/mediasoup/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@ export class MediasoupConfig {
useinbandfec: 1,
},
},
{
kind: 'video',
mimeType: 'video/H264',
clockRate: 90000,
parameters: {
'packetization-mode': 1,
'profile-level-id': '42e01f',
},
},
{
kind: 'video',
mimeType: 'video/VP8',
Expand Down
28 changes: 3 additions & 25 deletions apps/web/src/utils/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,21 @@ const DEFAULT_AUDIO_CONSTRAINTS: MediaTrackConstraints = {
autoGainControl: true,
};

const DEFAULT_VIDEO_CONSTRAINTS: MediaTrackConstraints = {
width: { ideal: 1280, min: 640, max: 1920 },
height: { ideal: 720, min: 360, max: 1080 },
frameRate: { max: 30, ideal: 15, min: 15 },
aspectRatio: { ideal: 16 / 9 },
};

const DEFAULT_SCREEN_CONSTRAINTS: MediaTrackConstraints = {
width: { max: 1920, ideal: 1280 },
height: { max: 1080, ideal: 720 },
frameRate: { max: 30, ideal: 15 },
};

const getCameraStream = async (options: MediaTrackConstraints = {}) => {
return navigator.mediaDevices.getUserMedia({
video: {
...DEFAULT_VIDEO_CONSTRAINTS,
...options,
},
video: { ...options },
});
};

const getMicStream = async (options: MediaTrackConstraints = {}) => {
return navigator.mediaDevices.getUserMedia({
audio: {
...DEFAULT_AUDIO_CONSTRAINTS,
...options,
},
audio: { ...DEFAULT_AUDIO_CONSTRAINTS, ...options },
});
};

const getScreenStream = async (options: MediaTrackConstraints = {}) => {
return navigator.mediaDevices.getDisplayMedia({
video: {
...DEFAULT_SCREEN_CONSTRAINTS,
...options,
},
video: { ...options },
});
};

Expand Down
Loading