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

feat: limit appliable constraints #56

Merged
merged 3 commits into from
Jun 30, 2023

Conversation

brycetham
Copy link
Contributor

This PR limits the constraints that can be passed to the applyConstraints method in both LocalAudioStream and LocalVideoStream.

@brycetham brycetham requested a review from bbaldino June 30, 2023 15:10
// track itself. This would not include 'deviceId', and maybe more of these values.
// Might need to define one AudioConstraints for use with getUserMedia, and refine
// it even further for applyConstraints here.
export type AudioConstraints = Pick<
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have these defined somewhere? The 'full set' should be usable in the getUserMedia calls

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do have AudioDeviceConstraints and VideoDeviceConstraints defined in device-management.ts, if that's what you're asking.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, but just noticed that we're not picking from MediaTrackConstraints when defining VideoDeviceConstraints like we do with AudioDeviceConstraints. I can make that change real fast.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok cool

@brycetham brycetham force-pushed the btham/appliable_constraints branch from 3705b4b to f30c6ce Compare June 30, 2023 17:26
@brycetham brycetham merged commit b92e5af into stream_classes Jun 30, 2023
@brycetham brycetham deleted the btham/appliable_constraints branch June 30, 2023 20:54
brycetham added a commit that referenced this pull request Jul 19, 2023
* feat: new stream classes initial commit (#49)

* feat: new stream classes initial commit

* refactor: originStream -> inputStream

* feat: integrate new stream types (#50)

* feat: replace LocalMicrophoneTrack with LocalMicrophoneStream

* refactor: replace LocalDisplayTrack with LocalDisplayStream

* refactor: replace LocalCameraTrack with LocalCameraStream

* refactor: remove LocalTrack

* refactor: rename originTrack -> inputTrack

* feat: effects api (#52)

* feat: add effects api

* fix: add loadingeffects protection

* test: localstream unit tests

* chore: upgrade effects version

* refactor: add methods and update events for stream classes (#55)

* refactor: add support for wcme refactor

* chore: minor updates to LocalStream and unit tests

---------

Co-authored-by: Bryce Tham <[email protected]>

* feat: limit appliable constraints (#56)

* feat: limit appliable constraints

* refactor: pick VideoDeviceConstraints from MediaTrackConstraints

---------

Co-authored-by: Bryce Tham <[email protected]>

* feat: listen to track events and additional updates to stream classes (#57)

* feat: listen to track events and additional updates to stream classes

* fix: preserve outputStream in changeOutputTrack

* chore: change outputStream to readonly

* chore: update unit tests and comments

---------

Co-authored-by: Bryce Tham <[email protected]>

* chore: update docs and errors in device management API

* fix: stop outputTrack on LocalStream stop

---------

Co-authored-by: bbaldino <[email protected]>
Co-authored-by: Tyler McCarthy <[email protected]>
Co-authored-by: Bryce Tham <[email protected]>
brycetham added a commit that referenced this pull request Jul 19, 2023
* feat: new stream classes initial commit (#49)

* feat: new stream classes initial commit

* refactor: originStream -> inputStream

* feat: integrate new stream types (#50)

* feat: replace LocalMicrophoneTrack with LocalMicrophoneStream

* refactor: replace LocalDisplayTrack with LocalDisplayStream

* refactor: replace LocalCameraTrack with LocalCameraStream

* refactor: remove LocalTrack

* refactor: rename originTrack -> inputTrack

* feat: effects api (#52)

* feat: add effects api

* fix: add loadingeffects protection

* test: localstream unit tests

* chore: upgrade effects version

* refactor: add methods and update events for stream classes (#55)

* refactor: add support for wcme refactor

* chore: minor updates to LocalStream and unit tests

---------

Co-authored-by: Bryce Tham <[email protected]>

* feat: limit appliable constraints (#56)

* feat: limit appliable constraints

* refactor: pick VideoDeviceConstraints from MediaTrackConstraints

---------

Co-authored-by: Bryce Tham <[email protected]>

* feat: listen to track events and additional updates to stream classes (#57)

* feat: listen to track events and additional updates to stream classes

* fix: preserve outputStream in changeOutputTrack

* chore: change outputStream to readonly

* chore: update unit tests and comments

---------

Co-authored-by: Bryce Tham <[email protected]>

* chore: update docs and errors in device management API

* fix: stop outputTrack on LocalStream stop

---------

Co-authored-by: bbaldino <[email protected]>
Co-authored-by: Tyler McCarthy <[email protected]>
Co-authored-by: Bryce Tham <[email protected]>

BREAKING CHANGE: convert track-based classes into stream-based classes
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.

2 participants