Skip to content

Commit

Permalink
Update default video constraints (#578)
Browse files Browse the repository at this point in the history
* set default width/height constraints for RoomSession

* changeset
  • Loading branch information
edolix authored Jun 23, 2022
1 parent 5062a32 commit 2bd390d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-turkeys-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@signalwire/js': patch
---

Add default width/height for video constraints.
6 changes: 3 additions & 3 deletions packages/js/src/RoomSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import type { RoomSessionDocs } from './RoomSession.docs'
import type { RoomSessionJoinAudienceParams } from './utils/interfaces'

const VIDEO_CONSTRAINTS: MediaTrackConstraints = {
width: { ideal: 1280, min: 320 },
height: { ideal: 720, min: 180 },
aspectRatio: { ideal: 16 / 9 },
}

Expand Down Expand Up @@ -159,9 +161,7 @@ export const RoomSession = function (roomOptions: RoomSessionOptions) {
})
}

const joinAudience = (
params?: RoomSessionJoinAudienceParams
) => {
const joinAudience = (params?: RoomSessionJoinAudienceParams) => {
return new Promise(async (resolve, reject) => {
try {
// @ts-expect-error
Expand Down

0 comments on commit 2bd390d

Please sign in to comment.